John Haxby wrote: > Jan Engelhardt wrote: >> On Sunday 2009-03-01 23:37, pud wrote: >> >>> (sorry, msg-id lost) >>> >>> >>>> commit 19b0cd770d1e042c85bf0b278261a61d4cea8193 >>>> Author: Jan Engelhardt >>>> Date: Thu Feb 12 01:18:35 2009 +0100 >>>> >>> ... >>> >>>> - stringinfo->patlen=strlen((char *)&stringinfo->pattern); >>>> + stringinfo->patlen = strnlen((char *)&stringinfo->pattern, >>>> + sizeof(stringinfo->patlen)); >>>> >>> sorry, this doesn't work here, did you mean >>> sizeof(stringinfo->pattern)? >>> >> >> What do you mean "doesnot work"? >> > > It looks very weird to me as well. I may well be confused, but > > stringinfo->patlen = strnlen((char *)&stringinfo->pattern, > sizeof(stringinfo->patlen)) > > looks like something roughly equivalent to this: > > char pattern[256]; > int patlen; > patlen = strlen(pattern, 4); > > The "4" is sizeof(int) rather than the size of "pattern" Indeed. This was broken in: http://git.netfilter.org/cgi-bin/gitweb.cgi?p=iptables.git;a=commitdiff;h=37b4bde745698bf140d74e59a2561f34deeb8726;hp=41f03ba382dfd26e7db939fd02447058b1c56f7b Fix is attached. -- "Los honestos son inadaptados sociales" -- Les Luthiers