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:
a223dbd
)
fix fgetwc when decoding a character that crosses buffer boundary
author
Szabolcs Nagy
<nsz@port70.net>
Sat, 18 Nov 2017 16:51:48 +0000
(17:51 +0100)
committer
Rich Felker
<dalias@aerifal.cx>
Sun, 19 Nov 2017 01:11:08 +0000
(20:11 -0500)
Update the buffer position according to the bytes consumed into st when
decoding an incomplete character at the end of the buffer.
src/stdio/fgetwc.c
patch
|
blob
|
history
diff --git
a/src/stdio/fgetwc.c
b/src/stdio/fgetwc.c
index e455cfec408bc101c7c15077e68d45f4491e3395..a00c1a862babf2b0732909b77ce765cc31655888 100644
(file)
--- a/
src/stdio/fgetwc.c
+++ b/
src/stdio/fgetwc.c
@@
-22,6
+22,7
@@
static wint_t __fgetwc_unlocked_internal(FILE *f)
f->rpos++;
return WEOF;
}
+ f->rpos = f->rend;
} else l = -2;
/* Convert character byte-by-byte */