From cb4e566359c24ffd17702a64a01a676fb6ca65a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timo=20Ter=C3=A4s?= Date: Sun, 1 Jan 2017 18:47:32 +0200 Subject: main/musl: upgrade to 1.1.16 --- ...teger-overflow-of-tm_year-in-__secs_to_tm.patch | 40 ---------------------- 1 file changed, 40 deletions(-) delete mode 100644 main/musl/0031-fix-integer-overflow-of-tm_year-in-__secs_to_tm.patch (limited to 'main/musl/0031-fix-integer-overflow-of-tm_year-in-__secs_to_tm.patch') diff --git a/main/musl/0031-fix-integer-overflow-of-tm_year-in-__secs_to_tm.patch b/main/musl/0031-fix-integer-overflow-of-tm_year-in-__secs_to_tm.patch deleted file mode 100644 index 1a8e05010d..0000000000 --- a/main/musl/0031-fix-integer-overflow-of-tm_year-in-__secs_to_tm.patch +++ /dev/null @@ -1,40 +0,0 @@ -From bc1e7731cee963e422575f81048792f4d5db9641 Mon Sep 17 00:00:00 2001 -From: Daniel Sabogal -Date: Wed, 2 Nov 2016 22:29:36 -0400 -Subject: [PATCH] fix integer overflow of tm_year in __secs_to_tm - -the overflow check for years+100 did not account for the extra -year computed from the remaining months. instead, perform this -check after obtaining the final number of years. ---- - src/time/__secs_to_tm.c | 9 +++++---- - 1 file changed, 5 insertions(+), 4 deletions(-) - -diff --git a/src/time/__secs_to_tm.c b/src/time/__secs_to_tm.c -index 3a3123a1..093d9021 100644 ---- a/src/time/__secs_to_tm.c -+++ b/src/time/__secs_to_tm.c -@@ -60,15 +60,16 @@ int __secs_to_tm(long long t, struct tm *tm) - for (months=0; days_in_month[months] <= remdays; months++) - remdays -= days_in_month[months]; - -+ if (months >= 10) { -+ months -= 12; -+ years++; -+ } -+ - if (years+100 > INT_MAX || years+100 < INT_MIN) - return -1; - - tm->tm_year = years + 100; - tm->tm_mon = months + 2; -- if (tm->tm_mon >= 12) { -- tm->tm_mon -=12; -- tm->tm_year++; -- } - tm->tm_mday = remdays + 1; - tm->tm_wday = wday; - tm->tm_yday = yday; --- -2.11.0 - -- cgit v1.2.3