All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nicolas Bouliane <nib@cookinglinux.org>
To: netfilter-devel <netfilter-devel@lists.netfilter.org>
Cc: Pablo Neira <pablo@eurodev.net>
Subject: Re: [PATCH] ip_conntrack_ftp segfault
Date: Tue, 04 Jan 2005 13:45:41 -0500	[thread overview]
Message-ID: <41DAE455.9090207@cookinglinux.org> (raw)
In-Reply-To: <41DA715D.2080704@eurodev.net>

[-- Attachment #1: Type: text/plain, Size: 470 bytes --]

Pablo Neira wrote:
> nice catch, but read the comments below.

> Since this is a minor fix, try to modify as less things as you can. data 
> doesn't exist but look for its natural replacement which is fb_ptr.

Hey Pablo, thanks for the hints! :)

>> This patch fix two bugs (when DEBUGP is defined):
>> o The var `data` doesn't exist, hence gcc complains.
>> o It segfault because we print an integer with `%s`.

Signed-off-by: Nicolas Bouliane <nib@cookinglinux.org>



[-- Attachment #2: ip_conntrack_ftp.c.patch --]
[-- Type: text/x-patch, Size: 613 bytes --]

--- linux-2.6.10/net/ipv4/netfilter/ip_conntrack_ftp.c	2004-12-24 16:35:59.000000000 -0500
+++ linux-2.6.10NIB/net/ipv4/netfilter/ip_conntrack_ftp.c	2005-01-04 13:24:35.000000000 -0500
@@ -347,10 +347,9 @@
 		goto out;
 	}
 
-	DEBUGP("conntrack_ftp: match `%.*s' (%u bytes at %u)\n",
-	       (int)matchlen, data + matchoff,
-	       matchlen, ntohl(th->seq) + matchoff);
-
+	DEBUGP("conntrack_ftp: match `%s' (%u bytes at %u)\n",
+	       fb_ptr + matchoff, matchlen, ntohl(th->seq) + matchoff);
+			 
 	/* Allocate expectation which will be inserted */
 	exp = ip_conntrack_expect_alloc();
 	if (exp == NULL) {

  reply	other threads:[~2005-01-04 18:45 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-01-03 19:22 [PATCH] ip_conntrack_ftp segfault Nicolas Bouliane
2005-01-04 10:35 ` Pablo Neira
2005-01-04 18:45   ` Nicolas Bouliane [this message]
2005-02-01 13:24     ` Patrick McHardy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=41DAE455.9090207@cookinglinux.org \
    --to=nib@cookinglinux.org \
    --cc=netfilter-devel@lists.netfilter.org \
    --cc=pablo@eurodev.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.