mirror of
https://github.com/mpv-player/mpv
synced 2025-03-11 08:37:59 +00:00
http: fix potential NULL pointer issue
Found by clang analyzer. Untested.
This commit is contained in:
parent
02daf37328
commit
0212d7e804
@ -195,7 +195,10 @@ static int scast_streaming_start(stream_t *stream) {
|
|||||||
if (is_ultravox)
|
if (is_ultravox)
|
||||||
metaint = 0;
|
metaint = 0;
|
||||||
else {
|
else {
|
||||||
metaint = atoi(http_get_field(http_hdr, "Icy-MetaInt"));
|
metaint = -1;
|
||||||
|
char *h = http_get_field(http_hdr, "Icy-MetaInt");
|
||||||
|
if (h)
|
||||||
|
metaint = atoi(h);
|
||||||
if (metaint <= 0)
|
if (metaint <= 0)
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user