Commit f2b51fd5 authored by Michael Niedermayer's avatar Michael Niedermayer

avformat/dashdec: Fix strlen(rep_id_val) with it being NULL

Fixes: dash-crash-da39a3ee5e6b4b0d3255bfef95601890afd80709.xml
Found-by: 's avatarPaul Ch <paulcher@icloud.com>
Reviewed-by: 's avatarSteven Liu <lq@chinaffmpeg.org>
Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 46753bfd)
Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent 0f36c5f5
......@@ -862,7 +862,9 @@ static int parse_manifest_representation(AVFormatContext *s, const char *url,
baseurl_nodes[3] = representation_baseurl_node;
ret = resolve_content_path(s, url, &c->max_url_size, baseurl_nodes, 4);
c->max_url_size = aligned(c->max_url_size + strlen(rep_id_val) + strlen(rep_bandwidth_val));
c->max_url_size = aligned(c->max_url_size
+ (rep_id_val ? strlen(rep_id_val) : 0)
+ (rep_bandwidth_val ? strlen(rep_bandwidth_val) : 0));
if (ret == AVERROR(ENOMEM) || ret == 0) {
goto end;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment