From: chris mikkelson Date: Thu, 11 Mar 2010 04:40:27 +0000 (-0600) Subject: Fix stack-garbage bug in quoted-printable decoder. X-Git-Url: https://git.mikk.net/?a=commitdiff_plain;h=01554b066785ab273f367ba65fac76e512bfda85;p=liburl Fix stack-garbage bug in quoted-printable decoder. --- diff --git a/quoted-printable.c b/quoted-printable.c index 8111ab3..b4ef580 100644 --- a/quoted-printable.c +++ b/quoted-printable.c @@ -43,7 +43,7 @@ qp_decode(struct qp_state *qps, char *s, int len, char *out, int size, int *olen) { char c; - int ret; + int ret = 0; for (*olen = 0; len > 0 && size > 0; s++, len--, ret++) { switch(qps->state) { @@ -110,9 +110,6 @@ quoted_process(msgproc *m, char *buf, size_t len) while (len > 0) { ret = qp_decode(qps, buf, len, tmp, sizeof(tmp), &tmplen); - if (ret < 1) { - /* TODO: handle errors */ - } msgproc_process(next, tmp, tmplen); buf += ret; len -= ret; }