Skip to content

Reduce chance for overflow in ParseTime#331

Open
bmwiedemann wants to merge 1 commit intoInterNetNews:mainfrom
bmwiedemann:time
Open

Reduce chance for overflow in ParseTime#331
bmwiedemann wants to merge 1 commit intoInterNetNews:mainfrom
bmwiedemann:time

Conversation

@bmwiedemann
Copy link

Without this patch, an input of 802M (months) could surprisingly produce a negative return value.

Use atoi to match the type of the tmp variable.

This patch was done while reviewing potential year-2038 issues in openSUSE.

Without this patch, an input of 802M (months) could surprisingly produce
a negative return value.

Use `atoi` to match the type of the tmp variable.

This patch was done while reviewing potential year-2038 issues in openSUSE.
@Julien-Elie Julien-Elie self-assigned this Mar 8, 2026
@Julien-Elie Julien-Elie added bug Something isn't working C: storage Related to storage methods P: low Low priority labels Mar 8, 2026
@Julien-Elie Julien-Elie added this to the 2.7.4 milestone Mar 8, 2026
@Julien-Elie
Copy link
Contributor

Thanks Bernhard for the patch!
I'll commit it soon.

BTW, do not hesitate to tell us if you see other potential Y2038 issues (we still have one opened: #292).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working C: storage Related to storage methods P: low Low priority

Development

Successfully merging this pull request may close these issues.

2 participants