lkml.org 
[lkml]   [2024]   [Apr]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] bpf: strnchr not suitable for getting NUL-terminator
Date
> > The strnchr() is not suitable for obtaining the end of a string with a length
> > exceeding 1 and ending with a NUL character.
>
> Could you give more detailed explanation with specific examples? I think
> strnchr() does the right thing here. Note that if fmt is not NULL,
> strnchrnul() never returns NULL pointer so in the change below,
> 'if (!fmt_end)' will be always false.
My mistake, strnchr() work well.
>
> >


\
 
 \ /
  Last update: 2024-05-27 16:35    [W:0.024 / U:0.224 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site