diff options
author | bertrand <bertrand@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2001-06-05 08:46:31 +0000 |
---|---|---|
committer | bertrand <bertrand@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2001-06-05 08:46:31 +0000 |
commit | 36dc28b88bcc2eea4a0cff4ea3958fae829adfc3 (patch) | |
tree | ef609075c0ed9e2560cd6d66c786354401214575 | |
parent | a279c993dc77e7b05446ee88d873cefe9dffe544 (diff) | |
download | mpv-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.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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"); |