lkml.org 
[lkml]   [2010]   [Jan]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH 2/2] string: teach strnstr() to not search past NUL-terminator
On Sun, Jan 17, 2010 at 11:47 PM, Li Zefan <lizf@cn.fujitsu.com> wrote:
> André Goddard Rosa wrote:
>> As noticed by Alex Riesen at:
>> http://marc.info/?l=linux-kernel&m=126364040821071&w=2
>>
> Please don't make this change, it's the user's responsibility
> to make sure @len won't exceed @s1's length.
>
> All the string functions of "n" version should work when
> @s1 is not null-terminated, so don't call strlen() on @s1.

Fair enough, agreed.

Thank you,
André
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2010-01-18 16:13    [W:1.106 / U:0.000 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site