diff options
author | Ulrich Drepper <drepper@redhat.com> | 2000-04-21 06:58:22 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2000-04-21 06:58:22 +0000 |
commit | 376b8b3de93bcb3bb4a739d62bc02895f6eba227 (patch) | |
tree | 09ac3b19b282c0c0e85aba1eb0ea60de840a6ae4 /wcsmbs/wcsrtombs.c | |
parent | 4a069c3345ea4e832c814a46267942226e53f9a2 (diff) | |
download | glibc-376b8b3de93bcb3bb4a739d62bc02895f6eba227.tar.gz glibc-376b8b3de93bcb3bb4a739d62bc02895f6eba227.tar.xz glibc-376b8b3de93bcb3bb4a739d62bc02895f6eba227.zip |
Update.
* wcsmbs/wcsrtombs.c (__wcsrtombs): If output buffer is too small don't search for NUL byte to decrement counter. Reported by Ulrich.Brink@sap.com.
Diffstat (limited to 'wcsmbs/wcsrtombs.c')
-rw-r--r-- | wcsmbs/wcsrtombs.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/wcsmbs/wcsrtombs.c b/wcsmbs/wcsrtombs.c index cbb39d36e6..28af214f18 100644 --- a/wcsmbs/wcsrtombs.c +++ b/wcsmbs/wcsrtombs.c @@ -114,8 +114,7 @@ __wcsrtombs (dst, src, len, ps) /* We have to determine whether the last character converted is the NUL character. */ - if ((status == __GCONV_OK || status == __GCONV_EMPTY_INPUT - || status == __GCONV_FULL_OUTPUT) + if ((status == __GCONV_OK || status == __GCONV_EMPTY_INPUT) && data.__outbuf[-1] == '\0') { assert (data.__outbuf != (unsigned char *) dst); |