|
current parsers.c,1.115,1.116: msg#00001web.privoxy.cvs
Update of /cvsroot/ijbswa/current In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv1705 Modified Files: parsers.c Log Message: Fix a crash on mingw32 with some Last Modified times in the future. Index: parsers.c =================================================================== RCS file: /cvsroot/ijbswa/current/parsers.c,v retrieving revision 1.115 retrieving revision 1.116 diff -u -d -r1.115 -r1.116 --- parsers.c 2 Nov 2007 16:52:50 -0000 1.115 +++ parsers.c 1 Dec 2007 13:04:22 -0000 1.116 @@ -44,6 +44,9 @@ * * Revisions : * $Log$ + * Revision 1.116 2007/12/01 13:04:22 fabiankeil + * Fix a crash on mingw32 with some Last Modified times in the future. + * * Revision 1.115 2007/11/02 16:52:50 fabiankeil * Remove a "can't happen" error block which, over * time, mutated into a "guaranteed to happen" block. @@ -2599,7 +2602,16 @@ rtime = (long int)difftime(now, last_modified); if (rtime) { + int negative = 0; + + if (rtime < 0) + { + rtime *= -1; + negative = 1; + log_error(LOG_LEVEL_HEADER, "Server time in the future."); + } rtime = pick_from_range(rtime); + if (negative) rtime *= -1; last_modified += rtime; #ifdef HAVE_GMTIME_R timeptr = gmtime_r(&last_modified, &gmt); ------------------------------------------------------------------------- SF.Net email is sponsored by: The Future of Linux Business White Paper from Novell. From the desktop to the data center, Linux is going mainstream. Let it simplify your IT future. http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4 |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | current miscutil.c,1.55,1.56: 00001, noreply |
|---|---|
| Next by Date: | current/debian changelog,1.26,1.27: 00001, noreply |
| Previous by Thread: | current miscutil.c,1.55,1.56i: 00001, noreply |
| Next by Thread: | current/debian changelog,1.26,1.27: 00001, noreply |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |