mirror of
https://github.com/rfc1036/whois.git
synced 2026-08-31 07:30:22 +00:00
simple_recode: fix heap buffer overflow
This commit is contained in:
parent
1024386831
commit
6a6de7add2
@ -76,6 +76,9 @@ char *simple_recode(const iconv_t handle, const char *str)
|
||||
if (err != (size_t) -1)
|
||||
break; /* success */
|
||||
|
||||
if (outbytes_remaining == 0)
|
||||
errno = E2BIG;
|
||||
|
||||
switch (errno) {
|
||||
case EINVAL: /* incomplete multibyte sequence */
|
||||
case EILSEQ: /* invalid multibyte sequence */
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user