(qp_decode): Bugfix: extend chr to accomodate three characters and
terminate it with zero.
Showing
1 changed file
with
2 additions
and
1 deletions
... | @@ -395,9 +395,10 @@ qp_decode (const char *iptr, size_t isize, char *optr, size_t osize, | ... | @@ -395,9 +395,10 @@ qp_decode (const char *iptr, size_t isize, char *optr, size_t osize, |
395 | else | 395 | else |
396 | { | 396 | { |
397 | /* you get =XX where XX are hex characters. */ | 397 | /* you get =XX where XX are hex characters. */ |
398 | char chr[2]; | 398 | char chr[3]; |
399 | int new_c; | 399 | int new_c; |
400 | 400 | ||
401 | chr[3] = 0; | ||
401 | chr[0] = *iptr++; | 402 | chr[0] = *iptr++; |
402 | /* Ignore LF. */ | 403 | /* Ignore LF. */ |
403 | if (chr[0] != '\n') | 404 | if (chr[0] != '\n') | ... | ... |
-
Please register or sign in to post a comment