> I believe > is right.  sizeof (statfile) is 64, sizeof ("/proc//stat") is
> 12 (that includes the terminating '\0'), and 52 characters long d->d_name
> still fits (6 bytes /proc/, 52 bytes d->d_name, 5 bytes /stat and 1 byte
> '\0') while 53 characters are too much.  Equivalent of the above would be
> if (strlen (d->d_name) >= sizeof (statfile) - strlen ("/proc//stat"))

For some reason I was convinced this was strlen instead of sizeof...  fixed.

-- 
Eric Botcazou

Reply via email to