diff options
author | Rich Felker <dalias@aerifal.cx> | 2012-04-16 17:17:05 -0400 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2012-04-16 17:17:05 -0400 |
commit | a4310aa2f592779118912fe5e7f6df4fd6b6d64a (patch) | |
tree | cd7e2961c3f1a22656890e6b4f011234ce0cd5aa /src/string/rindex.c | |
parent | 96e9773eb764afa649b099a6e283dba4c69389a9 (diff) | |
download | musl-a4310aa2f592779118912fe5e7f6df4fd6b6d64a.tar.gz |
avoid hitting eof in wcstol
shunget cannot unget eof status, causing wcstol to leave endptr
pointing to the wrong place when scanning, for example, L"0x". cheap
fix is to make the read function provide an infinite stream of bogus
characters rather than eof. really this is something of a design flaw
in how the shgetc system is used for strto* and wcsto*; in the long
term, I believe multi-character unget should be scrapped and replaced
with a function that can subtract from the f->shcnt counter.
Diffstat (limited to 'src/string/rindex.c')
0 files changed, 0 insertions, 0 deletions