diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2021-12-05 18:52:29 +0100 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2021-12-08 00:42:48 +0100 |
commit | e38eaf47491a864b2180d1ade87ed0ef39dd6d34 (patch) | |
tree | eaf47cc5cd738a86e4e0f05f4657c7ea7114dbca /libavformat/hls.c | |
parent | b09ea67b40e342f5e4183e9ebc0c14801ecd218c (diff) | |
download | ffmpeg-e38eaf47491a864b2180d1ade87ed0ef39dd6d34.tar.gz |
avformat/utils: Make ff_data_to_hex() zero-terminate the string
Most callers want it that way anyway.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavformat/hls.c')
-rw-r--r-- | libavformat/hls.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/libavformat/hls.c b/libavformat/hls.c index 52a031ed54..557faf8e8d 100644 --- a/libavformat/hls.c +++ b/libavformat/hls.c @@ -1284,7 +1284,6 @@ static int open_input(HLSContext *c, struct playlist *pls, struct segment *seg, char iv[33], key[33], url[MAX_URL_SIZE]; ff_data_to_hex(iv, seg->iv, sizeof(seg->iv), 0); ff_data_to_hex(key, pls->key, sizeof(pls->key), 0); - iv[32] = key[32] = '\0'; if (strstr(seg->url, "://")) snprintf(url, sizeof(url), "crypto+%s", seg->url); else @@ -2074,7 +2073,6 @@ static int hls_read_header(AVFormatContext *s) if (strstr(in_fmt->name, "mov")) { char key[33]; ff_data_to_hex(key, pls->key, sizeof(pls->key), 0); - key[32] = '\0'; av_dict_set(&options, "decryption_key", key, AV_OPT_FLAG_DECODING_PARAM); } else if (!c->crypto_ctx.aes_ctx) { c->crypto_ctx.aes_ctx = av_aes_alloc(); |