mirror of
https://github.com/mpv-player/mpv
synced 2025-01-24 19:37:30 +01:00
Make http_read_response fail if parsing the response failed.
Avoids possible crashes since other code assumes http_hdr->protocol is a valid string if it succeeds. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30951 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
db734715dc
commit
f76e141402
@ -299,7 +299,10 @@ http_read_response( int fd ) {
|
||||
}
|
||||
http_response_append( http_hdr, response, i );
|
||||
} while( !http_is_header_entire( http_hdr ) );
|
||||
http_response_parse( http_hdr );
|
||||
if (http_response_parse( http_hdr ) < 0) {
|
||||
http_free( http_hdr );
|
||||
return NULL;
|
||||
}
|
||||
return http_hdr;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user