Skip to content

Commit 47acdcb

Browse files
committed
Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5: Ensure we have enough input data before parsing date
2 parents c5659cb + 13a218d commit 47acdcb

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

ext/xmlrpc/libxmlrpc/xmlrpc.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,9 +201,13 @@ static int date_from_ISO8601 (const char *text, time_t * value) {
201201
}
202202
p++;
203203
}
204-
text = buf;
204+
*p2 = 0;
205+
text = buf;
205206
}
206207

208+
if (strlen(text)<17) {
209+
return -1;
210+
}
207211

208212
tm.tm_isdst = -1;
209213

0 commit comments

Comments
 (0)