(__wcsrtombs): If output buffer is too small don't search for NUL byte
authordrepper <drepper>
Fri, 21 Apr 2000 06:57:46 +0000 (06:57 +0000)
committerdrepper <drepper>
Fri, 21 Apr 2000 06:57:46 +0000 (06:57 +0000)
to decrement counter.

wcsmbs/wcsrtombs.c

index cbb39d3..28af214 100644 (file)
@@ -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);