cURL / Mailing Lists / curl-library / Single Mail


Re: [PATCH] fix cookie max-age field integer overflow bug in libcurl

From: Daniel Stenberg <>
Date: Wed, 15 Jan 2014 11:45:47 +0100 (CET)

On Tue, 14 Jan 2014, chen prog wrote:

> when http server return as
> Set-Cookie: ID=D31939F01C9A5F71918AB1573B9CE3FA:FG=1; expires=Thu,
> 31-Dec-37 23:55:55 GMT; max-age=2147483647; path=/;
> must make sure max-age after expires and max-age=0x7FFFFFFF
> in libcurl cookie_add will make a overflow max-age, result in cookie invalid

Thanks, but I couldn't help a nagging feeling we can do even better and I
wanted to hear what you and others have to say...

1 - your patch makes the line too long

2 - shouldn't we handle max-age larger than 31 bits? Firefox does...

3 - should we care about old systems without 64 bit types to not overflow?

List admin:
Received on 2014-01-15