mirror of
https://github.com/mpv-player/mpv
synced 2024-11-18 21:16:10 +01:00
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:
parent
a279c993dc
commit
36dc28b88b
2
http.c
2
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");
|
||||
|
Loading…
Reference in New Issue
Block a user