Commit 72a838b1 72a838b15876f49d3b78a57e4aa42338a1f8bedb by Sergey Poznyakoff

(qp_decode): Bugfix: extend chr to accomodate three characters and

terminate it with zero.
1 parent 06931f48
...@@ -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')
......