avformat/libzmq: Check av_strstart()

Fixes: CID1453457 Unchecked return value

Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 0263b6a48c)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
release/7.0
Michael Niedermayer 8 months ago
parent b8ee22e1dd
commit 871c89e0ba
No known key found for this signature in database
GPG Key ID: B18E8928B3948D64
  1. 5
      libavformat/libzmq.c

@ -94,7 +94,10 @@ static int zmq_proto_open(URLContext *h, const char *uri, int flags)
return AVERROR_EXTERNAL; return AVERROR_EXTERNAL;
} }
av_strstart(uri, "zmq:", &uri); if (av_strstart(uri, "zmq:", &uri)) {
av_log(h, AV_LOG_ERROR, "URL %s lacks prefix\n", uri);
return AVERROR(EINVAL);
}
/*publish during write*/ /*publish during write*/
if (h->flags & AVIO_FLAG_WRITE) { if (h->flags & AVIO_FLAG_WRITE) {

Loading…
Cancel
Save