diff options
author | wm4 <wm4@nowhere> | 2012-11-01 00:22:12 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2012-11-01 02:12:17 +0100 |
commit | 0212d7e804da82784bb2c60c08fc86e8aa160874 (patch) | |
tree | 1802df4441812fe4be12a5efc54a9eeeba6035e0 /stream/http.c | |
parent | 02daf37328c57ab12bd086a0d4ce91a5f6d70a97 (diff) | |
download | mpv-0212d7e804da82784bb2c60c08fc86e8aa160874.tar.bz2 mpv-0212d7e804da82784bb2c60c08fc86e8aa160874.tar.xz |
http: fix potential NULL pointer issue
Found by clang analyzer. Untested.
Diffstat (limited to 'stream/http.c')
-rw-r--r-- | stream/http.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/stream/http.c b/stream/http.c index 3971aa9d05..61795bcf9b 100644 --- a/stream/http.c +++ b/stream/http.c @@ -195,7 +195,10 @@ static int scast_streaming_start(stream_t *stream) { if (is_ultravox) metaint = 0; 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) return -1; } |