about summary refs log tree commit diff
path: root/include
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2014-06-02 16:21:47 -0400
committerRich Felker <dalias@aerifal.cx>2014-06-06 17:57:36 -0400
commit5fa12af8daeaa71add0ccd15e082c01154545def (patch)
treec8112fc62bee0c5c8211ceaa13b1d3d421191550 /include
parent94100a0115af03d478c93b8875aae0409a62186f (diff)
downloadmusl-5fa12af8daeaa71add0ccd15e082c01154545def.tar.gz
musl-5fa12af8daeaa71add0ccd15e082c01154545def.tar.xz
musl-5fa12af8daeaa71add0ccd15e082c01154545def.zip
fix incorrect end pointer in some cases when wcsrtombs stops early
when wcsrtombs stopped due to hitting zero remaining space in the
output buffer, it was wrongly clearing the position pointer as if it
had completed the conversion successfully.

this commit rearranges the code somewhat to make a clear separation
between the cases of ending due to running out of output buffer space,
and ending due to reaching the end of input or an illegal sequence in
the input. the new branches have been arranged with the hope of
optimizing more common cases, too.

(cherry picked from commit 8fba4458afb7304b32ca887e4a3990c6029131f9)
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions