Messages in this thread | | | From | André Goddard Rosa <> | Date | Mon, 18 Jan 2010 13:10:35 -0200 | Subject | Re: [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/
| |