Update misc.c

Allocate extra byte for null termination of string
This commit is contained in:
uvjustin 2020-03-25 14:57:23 +08:00 committed by GitHub
parent cfecb4a5f5
commit 27138edd55
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -823,7 +823,7 @@ b64_decode(int *dstlen, const char *src)
len = AV_BASE64_DECODE_SIZE(strlen(src));
CHECK_NULL(L_MISC, out = calloc(1, len));
CHECK_NULL(L_MISC, out = calloc(1, len+1));
ret = av_base64_decode(out, src, len);
if (ret < 0)