Null-terminate the string in percent_decode() so that we don't depend on

malloc() returning zeroed storage or dump core while starting up.

Found-by:	/etc/malloc.conf ->AJ
This commit is contained in:
bde 1997-02-02 09:16:37 +00:00
parent 43e3da75f2
commit baba602eab

View File

@ -26,7 +26,7 @@
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id$
* $Id: util.c,v 1.1 1997/01/30 21:43:44 wollman Exp $
*/
#include <sys/types.h>
@ -148,6 +148,7 @@ percent_decode(const char *uri)
*s++ = *uri++;
}
}
*s = '\0';
return rv;
}