On Thu, 1 Mar 2018 10:47:42 +0100 Marc-André Lureau <marcandre.lur...@gmail.com> wrote:
> Hi > > On Thu, Mar 1, 2018 at 8:08 AM, Julia Suvorova via Qemu-devel > <qemu-devel@nongnu.org> wrote: > > basename(3) and dirname(3) modify their argument and may return > > pointers to statically allocated memory which may be overwritten by > > subsequent calls. > > g_path_get_basename and g_path_get_dirname have no such issues, and > > therefore more preferable. > > > > Signed-off-by: Julia Suvorova <jus...@mail.ru> > > What about adding a warning for basename()/dirname() usage in > scripts/checkpatch.pl ? +1 to that. > > Reviewed-by: Marc-André Lureau <marcandre.lur...@redhat.com> Reviewed-by: Cornelia Huck <coh...@redhat.com>