Svante Signell, le Wed 29 Jan 2014 14:20:47 +0100, a écrit :
> 1) src/Rserv.c: Since PATH_MAX is not defined use the st_size parameter
> of a previously made lstat() call:

Errr, but st_size contains the size of the file, not the size of the
name of the file...

> (Problems can arise since rm_rf() is recursive?? Help needed here!)

Not a problem: you'll get newer variables. Just keep the call as it is.

> -                                     snprintf(path, sizeof(path), "%s/%s", 
> what, d->d_name);
> +                                     int len = st.st_size + 
> strlen(d->d_name) + 1;

Just use strlen(what) instead of st.st_size. Also don't forget to count
the / !

Samuel


-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]
Archive: http://lists.debian.org/20140131184856.GC11961@type

Reply via email to