Checked the length arg when appending data.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@1028 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
1 parent
a279c993dc
commit
36dc28b88b
1 file changed
+1
-1
@@ -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");
|
||||
|
||||
Reference in new issue
Block a user