On Sun, 17 Jul 2011, Christophe CURIS wrote: hi,
> --- a/WINGs/proplist.c > +++ b/WINGs/proplist.c > @@ -1677,7 +1677,7 @@ int wmkdirhier(const char *path) > while (p++ < plen && thePath[p] != '/') > ; > > - strncpy(buf, thePath, p); > + strncpy(buf, thePath, p); // TODO: This is not great. No > guarranty that p < sizeof(buf) are you sure about this? i've been tryng to get back in the mindset i was in when i wrote this (not much success, though), but i don't see where or how can this overflow. can you describe a situation when it does? > --- a/WINGs/wcolorpanel.c > +++ b/WINGs/wcolorpanel.c > @@ -3400,9 +3400,8 @@ char *generateNewFilename(char *curName) i have no idea what this function really does, but i'm pretty sure that - it should be static (its only caller is) - i really don't like the look of it ;) what does this _do_ and how is it's result actually used? > --- a/src/defaults.c > +++ b/src/defaults.c > @@ -2006,6 +2006,7 @@ static int getKeybind(WScreen * scr, WDefaultEntry * > entry, WMPropList * value, > } > > strncpy(buf, val, MAX_SHORTCUT_LENGTH); > + buf[MAX_SHORTCUT_LENGTH-1] = '\0'; please don't. convert src/ to use wstrlcpy (and wstrlcat, where applicable). -- [-] mkdir /nonexistent -- To unsubscribe, send mail to [email protected].
