projects
/
oweals
/
musl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d2e061a
)
strptime: fix use of uninitialized dest field in converting integer
author
Rich Felker
<dalias@aerifal.cx>
Mon, 5 Sep 2011 19:39:36 +0000
(15:39 -0400)
committer
Rich Felker
<dalias@aerifal.cx>
Mon, 5 Sep 2011 19:39:36 +0000
(15:39 -0400)
src/time/strptime.c
patch
|
blob
|
history
diff --git
a/src/time/strptime.c
b/src/time/strptime.c
index d9481d1bceb21ddd4d1deede367d1025f4eb19e4..488c08dd657aaca737a14659ef045469162085e9 100644
(file)
--- a/
src/time/strptime.c
+++ b/
src/time/strptime.c
@@
-155,7
+155,7
@@
char *strptime(const char *s, const char *f, struct tm *tm)
if (*s == '+') s++;
else if (*s == '-') neg=1, s++;
if (!isdigit(*s)) return 0;
- for (i=0; i<w && isdigit(*s); i++)
+ for (
*dest=
i=0; i<w && isdigit(*s); i++)
*dest = *dest * 10 + *s++ - '0';
if (neg) *dest = -*dest;
*dest -= adj;