about summary refs log tree commit diff
path: root/sysdeps
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2016-09-02 15:59:34 +0200
committerFlorian Weimer <fweimer@redhat.com>2016-09-02 15:59:34 +0200
commit9dd87afbf1a2f7991a733609bbda6f26cadaa6ce (patch)
tree92f2635fe04cf52d11e3eaf91dab849c7ef1bdba /sysdeps
parent326e288b1e43832c138e5eb4521157d8aacef5b7 (diff)
downloadglibc-9dd87afbf1a2f7991a733609bbda6f26cadaa6ce.tar.gz
glibc-9dd87afbf1a2f7991a733609bbda6f26cadaa6ce.tar.xz
glibc-9dd87afbf1a2f7991a733609bbda6f26cadaa6ce.zip
vfscanf: Avoid multiple reads of multi-byte character width
This avoids a race condition if the process-global locale is changed
while vfscanf is running.  MB_LEN_MAX is always larger than MB_CUR_MAX,
so we might realloc earlier than necessary (but even MB_CUR_MAX could
be larger than the minimum required space).

The existing length was a bit questionable because str + MB_LEN_MAX
might point past the end of the buffer.
Diffstat (limited to 'sysdeps')
0 files changed, 0 insertions, 0 deletions