From 36dc28b88bcc2eea4a0cff4ea3958fae829adfc3 Mon Sep 17 00:00:00 2001 From: bertrand Date: Tue, 5 Jun 2001 08:46:31 +0000 Subject: [PATCH] Checked the length arg when appending data. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@1028 b3059339-0415-0410-9bf9-f77b7e298cf2 --- http.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/http.c b/http.c index 6ee802aac5..75157fccf0 100644 --- a/http.c +++ b/http.c @@ -40,7 +40,7 @@ http_free( HTTP_header_t *http_hdr ) { int http_response_append( HTTP_header_t *http_hdr, char *response, int length ) { char *ptr = NULL; - if( http_hdr==NULL || response==NULL ) return -1; + if( http_hdr==NULL || response==NULL || length<0 ) return -1; ptr = (char*)malloc( http_hdr->buffer_size+length ); if( ptr==NULL ) { printf("Memory allocation failed\n");