(__gconv): Deal with outbuf being NULL.
authordrepper <drepper>
Tue, 21 Dec 1999 07:22:57 +0000 (07:22 +0000)
committerdrepper <drepper>
Tue, 21 Dec 1999 07:22:57 +0000 (07:22 +0000)
iconv/gconv.c

index 6e3080b..b9c404a 100644 (file)
@@ -39,7 +39,7 @@ __gconv (__gconv_t cd, const unsigned char **inbuf,
   assert (converted != NULL);
   *converted = 0;
 
-  cd->__data[last_step].__outbuf = *outbuf;
+  cd->__data[last_step].__outbuf = outbuf != NULL ? *outbuf : NULL;
   cd->__data[last_step].__outbufend = outbufend;
 
   if (inbuf == NULL || *inbuf == NULL)