From patchwork Thu Apr 9 21:57:17 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Weinberger X-Patchwork-Id: 459848 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 6C7821401DD for ; Fri, 10 Apr 2015 07:59:38 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754309AbbDIV5h (ORCPT ); Thu, 9 Apr 2015 17:57:37 -0400 Received: from mail.sigma-star.at ([95.130.255.111]:14389 "EHLO mail.sigma-star.at" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754146AbbDIV5f (ORCPT ); Thu, 9 Apr 2015 17:57:35 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by mail.sigma-star.at (Postfix) with ESMTP id CD8FE24F8003; Thu, 9 Apr 2015 23:57:30 +0200 (CEST) X-Virus-Scanned: amavisd-new at mail.sigma-star.at Received: from azrael.upc.at (chello213047235169.tirol.surfer.at [213.47.235.169]) by mail.sigma-star.at (Postfix) with ESMTPSA id AF5CC16B447D; Thu, 9 Apr 2015 23:57:29 +0200 (CEST) From: Richard Weinberger To: netdev@vger.kernel.org Cc: linux-wireless@vger.kernel.org, coreteam@netfilter.org, netfilter-devel@vger.kernel.org, linux-kernel@vger.kernel.org, sameo@linux.intel.com, aloisio.almeida@openbossa.org, lauro.venancio@openbossa.org, davem@davemloft.net, kadlec@blackhole.kfki.hu, kaber@trash.net, pablo@netfilter.org, Richard Weinberger Subject: [PATCH 5/5 v2] netfilter: Fix format string of nfnetlink_log proc file Date: Thu, 9 Apr 2015 23:57:17 +0200 Message-Id: <1428616637-21690-5-git-send-email-richard@nod.at> X-Mailer: git-send-email 1.8.4.5 In-Reply-To: <1428616637-21690-1-git-send-email-richard@nod.at> References: <1428616637-21690-1-git-send-email-richard@nod.at> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org The printed values are all of type unsigned integer, therefore use %u instead of %d. Otherwise an user can face negative values. Signed-off-by: Richard Weinberger --- net/netfilter/nfnetlink_log.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/netfilter/nfnetlink_log.c b/net/netfilter/nfnetlink_log.c index 7150d11..313c26c 100644 --- a/net/netfilter/nfnetlink_log.c +++ b/net/netfilter/nfnetlink_log.c @@ -998,7 +998,7 @@ static int seq_show(struct seq_file *s, void *v) { const struct nfulnl_instance *inst = v; - return seq_printf(s, "%5d %6d %5d %1d %5d %6d %2d\n", + return seq_printf(s, "%5u %6u %5u %1u %5u %6u %2u\n", inst->group_num, inst->peer_portid, inst->qlen, inst->copy_mode, inst->copy_range,