--- libaitwww/src/mime.c 2012/03/09 15:53:40 1.1.1.1.2.3 +++ libaitwww/src/mime.c 2012/03/10 00:26:04 1.1.1.1.2.4 @@ -3,7 +3,7 @@ * by Michael Pounov * * $Author: misho $ -* $Id: mime.c,v 1.1.1.1.2.3 2012/03/09 15:53:40 misho Exp $ +* $Id: mime.c,v 1.1.1.1.2.4 2012/03/10 00:26:04 misho Exp $ * ************************************************************************** The ELWIX and AITNET software is distributed under the following @@ -328,7 +328,7 @@ mime_parseMultiPart(const char *str, size_t len, const mime_t *mime = NULL; struct iovec bd[2]; struct tagMIME *m, *old = NULL; - const char *next; + const char *next = NULL; if (!str | !bdtag) { www_SetErr(EINVAL, "String or boundary tag is NULL"); @@ -372,7 +372,7 @@ mime_parseMultiPart(const char *str, size_t len, const len -= strlen(strstr(bd[0].iov_base, "--")); } - while (42) { + while (len > 0) { m = malloc(sizeof(struct tagMIME)); if (!m) { LOGERR;