All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rene Herman <rene.herman@keyaccess.nl>
To: netfilter-devel@lists.netfilter.org
Cc: Rene Herman <rene.herman@keyaccess.nl>,
	Harald Welte <laforge@gnumonks.org>
Subject: [PATCH] ip_conntrack_irc, allowance for quoted filenames
Date: Mon, 12 May 2003 03:38:16 +0200	[thread overview]
Message-ID: <3EBEFB08.4070903@keyaccess.nl> (raw)

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

Resend, this time _with_ patch ...

[ please keep me in CC, not subscribed ]

When the irssi (www.irssi.org) IRC client is asked to DCC SEND a file
with a filename containing spaces, it does so by leaving the spaces
intact and quoting the filename (""). ip_conntrack_irc.c:parse_dcc()
however can't handle the embedded spaces.

I haven't checked other clients but I assume they might do the same. Is
the attached hack (against 2.4.20) acceptable? Should this be solved
differently and/or elsewhere?

Rene.


[-- Attachment #2: linux-2.4.20-ip_conntrack_irc.diff --]
[-- Type: text/plain, Size: 568 bytes --]

--- linux-2.4.20/net/ipv4/netfilter/ip_conntrack_irc.c.orig	2002-12-01 02:32:52.000000000 +0100
+++ linux-2.4.20/net/ipv4/netfilter/ip_conntrack_irc.c	2003-05-12 02:10:01.000000000 +0200
@@ -82,6 +82,12 @@
 	ad_beg_p	returns pointer to first byte of addr data
 	ad_end_p	returns pointer to last byte of addr data */
 {
+	/* handle quoted arguments containing spaces */
+	if (*data == '"')
+		/* at least 14: "\" AAAAAAAA P\1\n" */
+		while (*++data != '"')
+			if (data > data_end - 14)
+				return -1;
 
 	/* at least 12: "AAAAAAAA P\1\n" */
 	while (*data++ != ' ')

             reply	other threads:[~2003-05-12  1:38 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-05-12  1:38 Rene Herman [this message]
2003-05-12  7:53 ` [PATCH] ip_conntrack_irc, allowance for quoted filenames Harald Welte
  -- strict thread matches above, loose matches on Subject: below --
2003-05-12  1:33 Rene Herman

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=3EBEFB08.4070903@keyaccess.nl \
    --to=rene.herman@keyaccess.nl \
    --cc=laforge@gnumonks.org \
    --cc=netfilter-devel@lists.netfilter.org \
    /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.