Re: [hackers] [sbase][patch]find: copy path before using basename

2016-12-27 Thread Laslo Hunhold
On Wed, 5 Oct 2016 15:41:55 -0700 Evan Gates wrote: Hey Evan, > On Mon, Oct 3, 2016 at 3:10 PM, FRIGN wrote: > > Please don't use VLA's. Use estrdup() in this case. > > sbase-find_basename2.diff: revised patch without VLAs > sbase-find_noVLAs.diff: path to

Re: [hackers] [sbase][patch]find: copy path before using basename

2016-10-14 Thread Laslo Hunhold
On Wed, 5 Oct 2016 15:41:55 -0700 Evan Gates wrote: Hey Evan, > On Mon, Oct 3, 2016 at 3:10 PM, FRIGN wrote: > > Please don't use VLA's. Use estrdup() in this case. > > sbase-find_basename2.diff: revised patch without VLAs > sbase-find_noVLAs.diff: path to

Re: [hackers] [sbase][patch]find: copy path before using basename

2016-10-05 Thread Evan Gates
On Mon, Oct 3, 2016 at 3:10 PM, FRIGN wrote: > Please don't use VLA's. Use estrdup() in this case. sbase-find_basename2.diff: revised patch without VLAs sbase-find_noVLAs.diff: path to remove all VLAs in find From 47b19cf1c341627eb796469f3793e5c26baea767 Mon Sep 17 00:00:00 2001

Re: [hackers] [sbase][patch]find: copy path before using basename

2016-10-03 Thread FRIGN
On Mon, 3 Oct 2016 15:04:16 -0700 Evan Gates wrote: > "The basename() function may modify the string pointed to by path..." > Thanks POSIX. > + char path[strlen(arg->path)+1]; > + strcpy(path, arg->path); > + return !fnmatch((char *)arg->extra.p, path, 0);