projects
/
platform
/
upstream
/
glibc.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Update.
[platform/upstream/glibc.git]
/
iconv
/
gconv.c
diff --git
a/iconv/gconv.c
b/iconv/gconv.c
index
0cbb052
..
5df1635
100644
(file)
--- a/
iconv/gconv.c
+++ b/
iconv/gconv.c
@@
-30,6
+30,9
@@
__gconv (gconv_t cd, const char **inbuf, size_t *inbytesleft, char **outbuf,
size_t oldinbytes = *inbytesleft;
int result;
+ if (cd == (gconv_t) -1L)
+ return GCONV_ILLEGAL_DESCRIPTOR;
+
cd->data[last_step].outbuf = *outbuf;
cd->data[last_step].outbufavail = 0;
cd->data[last_step].outbufsize = *outbytesleft;