From mboxrd@z Thu Jan 1 00:00:00 1970 From: Florian Zumbiehl Date: Sat, 05 Sep 2009 17:01:39 +0000 Subject: Re: [PATCH] fix buffer overflow in udev_util_replace_whitespace() Message-Id: <20090905170139.GD11579@florz.florz.dyndns.org> List-Id: References: <20090831173335.GL4363@florz.florz.dyndns.org> In-Reply-To: <20090831173335.GL4363@florz.florz.dyndns.org> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-hotplug@vger.kernel.org Hi, [...] > after > > strnlen("a", 2-1) = 0 | $ cat foo.c | | #include | #include | | int main(){ | printf("%u\n",strnlen("a",2-1)); | return 0; | } | | $ gcc -o foo foo.c | $ ./foo | 1 | $ Florian