1 From f33b17585058381491e6fda08f491b8e48c7980c Mon Sep 17 00:00:00 2001
2 From: Rich Felker <dalias@aerifal.cx>
3 Date: Thu, 20 Oct 2016 13:22:20 -0400
4 Subject: fix gratuitous undefined behavior in strptime
6 accessing an object of type const char *restrict as if it had type
9 src/time/strptime.c | 9 +++++++--
10 1 file changed, 7 insertions(+), 2 deletions(-)
12 diff --git a/src/time/strptime.c b/src/time/strptime.c
13 index f41f55f..55c7ed1 100644
14 --- a/src/time/strptime.c
15 +++ b/src/time/strptime.c
16 @@ -22,8 +22,13 @@ char *strptime(const char *restrict s, const char *restrict f, struct tm *restri
20 - if (isdigit(*f)) w=strtoul(f, (void *)&f, 10);
24 + w=strtoul(f, &new_f, 10);