diff options
-rw-r--r-- | rfc2047.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/rfc2047.c b/rfc2047.c index f739269..c152922 100644 --- a/rfc2047.c +++ b/rfc2047.c @@ -244,7 +244,7 @@ blaze822_decode_rfc2047(char *dst, char *src, size_t dlen, char *tgtenc) b = stop + 2; } while (dlen && (s = strstr(b, "=?"))); - while (*b && dlen > 0) { + while (*b && dlen > 1) { *dst++ = *b++; dlen--; } @@ -263,7 +263,7 @@ nocode: iconv_close(ic); free(srcenc); nocodeok: - while (*src && dlen) { + while (*src && dlen > 1) { *dst++ = *src++; dlen--; } |