]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
(__gconv): Deal with outbuf being NULL.
authorUlrich Drepper <drepper@redhat.com>
Tue, 21 Dec 1999 07:23:26 +0000 (07:23 +0000)
committerUlrich Drepper <drepper@redhat.com>
Tue, 21 Dec 1999 07:23:26 +0000 (07:23 +0000)
iconv/gconv.c

index 16a6b8fb94ed9cf67cd0e9ab998d37b2161c074a..0bef7929806a64132601e270ec66ac7c35ebdaa6 100644 (file)
@@ -40,7 +40,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)