cvs: php3 /functions mime.c

From: Date: Thu, 21 Feb 2002 18:49:49 +0000
Subject: cvs: php3 /functions mime.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-9420@lists.php.net to get a copy of this message
sesser Thu Feb 21 13:49:49 2002 EDT Modified files: /php3/functions mime.c Log: fixed: we now use the right variable Index: php3/functions/mime.c diff -u php3/functions/mime.c:1.64 php3/functions/mime.c:1.65 --- php3/functions/mime.c:1.64 Mon Oct 16 21:30:59 2000 +++ php3/functions/mime.c Thu Feb 21 13:49:47 2002 @@ -26,7 +26,7 @@ | Authors: Rasmus Lerdorf <rasmus@php.net> | +----------------------------------------------------------------------+ */ -/* $Id: mime.c,v 1.64 2000/10/17 01:30:59 sas Exp $ */ +/* $Id: mime.c,v 1.65 2002/02/21 18:49:47 sesser Exp $ */ #include <stdio.h> #include "php.h" #include "internal_functions.h" @@ -85,7 +85,9 @@ SAFE_RETURN; } loc = memchr(ptr, '\n', rem); + rem -= loc - ptr; name = strstr(ptr, " name="); + ptr = loc; if (name && name < loc) { name += 6; s = memchr(name, '\"', loc - name); @@ -138,6 +140,10 @@ sprintf(lbuf, "%s_name[]", abuf); sbuf=estrdup(abuf); } else { + if (abuf) { + efree(abuf); + abuf = NULL; + } sprintf(lbuf, "%s_name", namebuf); sbuf=estrdup(namebuf); }

« previous php.cvs (#9420) next »