summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbertrand <bertrand@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-06-05 08:46:31 +0000
committerbertrand <bertrand@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-06-05 08:46:31 +0000
commit36dc28b88bcc2eea4a0cff4ea3958fae829adfc3 (patch)
treeef609075c0ed9e2560cd6d66c786354401214575
parenta279c993dc77e7b05446ee88d873cefe9dffe544 (diff)
downloadmpv-36dc28b88bcc2eea4a0cff4ea3958fae829adfc3.tar.bz2
mpv-36dc28b88bcc2eea4a0cff4ea3958fae829adfc3.tar.xz
Checked the length arg when appending data.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@1028 b3059339-0415-0410-9bf9-f77b7e298cf2
-rw-r--r--http.c2
1 files changed, 1 insertions, 1 deletions
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");