microsoft / cpprestsdk

The C++ REST SDK is a Microsoft project for cloud-based client-server communication in native code using a modern asynchronous C++ API design. This project aims to help C++ developers connect to and interact with services.
Other
7.99k stars 1.65k forks source link

Fix printing the last day in a 400 year cycle. #1767

Open BillyONeal opened 1 year ago

BillyONeal commented 1 year ago

This was reported to me by "Jag S" over email trying to print 2000-12-31. The cause appears very similar to https://github.com/microsoft/cpprestsdk/pull/1550/files/198b034679cf7f962e242977b99ea5c63ad9eb03

I think this will cause a denial of service bug similar to the last day 365 one in the year 2400.

baptistemcn commented 1 year ago

Member of the team of "Jag S" here, Thank you very much !