im.pidgin.pidgin: d8eeeb11a340ddd5f02497312625bf290f71a4b7

nosnilmot at pidgin.im nosnilmot at pidgin.im
Thu Nov 22 11:50:47 EST 2007


-----------------------------------------------------------------
Revision: d8eeeb11a340ddd5f02497312625bf290f71a4b7
Ancestor: cc8513f94aa94550d600cd8a5d42475dbf7249c0
Author: nosnilmot at pidgin.im
Date: 2007-11-22T16:32:56
Branch: im.pidgin.pidgin

Modified files:
        libpurple/util.c

ChangeLog: 

Fix a bug in purple_str_to_time() that could cause it to try reading past
the end of the input string

-------------- next part --------------
============================================================
--- libpurple/util.c	51b455da971e63188f5c8af1eee6ef9b5c9e8952
+++ libpurple/util.c	c9b883b72cd5b442be0b31e5ba9268366f206843
@@ -817,8 +817,11 @@ purple_str_to_time(const char *timestamp
 
 			t->tm_isdst = -1;
 
-			if (*c == '.' && *(c+1) >= '0' && *(c+1) <= '9') /* dealing with precision we don't care about */
-				c += 4;
+			if (*c == '.') {
+				do {
+					c++;
+				} while (*c >= '0' && *c <= '9'); /* dealing with precision we don't care about */
+			}
 			if (*c == '+')
 				offset_positive = TRUE;
 			if (((*c == '+' || *c == '-') && (c = c + 1)) &&


More information about the Commits mailing list