Backport of timegm.c segfault fix
Joakim Plate
plate at student.chalmers.se
Sun Oct 22 22:20:59 GMT 2006
Hi,
I heads up for whoever handles backporting. The lib/replace/timegm.c has
been fixed in samba4, however it hasn't been backported to samba3. It still
segfaults there on invalid dates (month negative) wich gets handed from some
servers (landrives in particular).
As somebody pointed out the emulated function isn't complete. A -1 is
actually a proper value for month, but in the case of the date conversion
from dos to unix dates, the samba4 fix should be correct.
Also a small note, the for loop in that function uses unsigned i; to loop
instead of int i; wich would make more since since the limit is signed.
Cheers
/Joakim
More information about the samba-technical
mailing list