From patchwork Fri Apr 10 07:30:27 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Weinberger X-Patchwork-Id: 459949 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 D8E80140284 for ; Fri, 10 Apr 2015 17:31:21 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932068AbbDJHbC (ORCPT ); Fri, 10 Apr 2015 03:31:02 -0400 Received: from mail.sigma-star.at ([95.130.255.111]:14385 "EHLO mail.sigma-star.at" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753636AbbDJHbA (ORCPT ); Fri, 10 Apr 2015 03:31:00 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by mail.sigma-star.at (Postfix) with ESMTP id 50EAB16B4474; Fri, 10 Apr 2015 09:30:56 +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 BF5A716B43EB; Fri, 10 Apr 2015 09:30:53 +0200 (CEST) From: Richard Weinberger To: netdev@vger.kernel.org Cc: coreteam@netfilter.org, netfilter-devel@vger.kernel.org, linux-kernel@vger.kernel.org, davem@davemloft.net, kadlec@blackhole.kfki.hu, kaber@trash.net, pablo@netfilter.org, Richard Weinberger Subject: [PATCH v3] netfilter: Fix format string of nfnetlink_log proc file Date: Fri, 10 Apr 2015 09:30:27 +0200 Message-Id: <1428651027-22845-1-git-send-email-richard@nod.at> X-Mailer: git-send-email 1.8.4.5 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 --- Pablo, this is an updated version of "[PATCH 5/5 v2] netfilter: Fix format string of nfnetlink_log proc file", now it is based on net-next. Sorry for the troube. Thanks, //richard --- 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 5c79735..3ad9126 100644 --- a/net/netfilter/nfnetlink_log.c +++ b/net/netfilter/nfnetlink_log.c @@ -1007,7 +1007,7 @@ static int seq_show(struct seq_file *s, void *v) { const struct nfulnl_instance *inst = v; - seq_printf(s, "%5d %6d %5d %1d %5d %6d %2d\n", + 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,