From: Flole998 Date: Wed, 17 Feb 2021 23:17:08 +0000 (+0100) Subject: Fix too small memory allocation X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8e2ac3ac8dd804f2d6c892644948b8178b5f285b;p=thirdparty%2Ftvheadend.git Fix too small memory allocation --- diff --git a/src/transcoding/memutils.c b/src/transcoding/memutils.c index d7ebca85e..f34eaec90 100644 --- a/src/transcoding/memutils.c +++ b/src/transcoding/memutils.c @@ -21,6 +21,7 @@ #include "memutils.h" #include +#include static char * @@ -107,7 +108,7 @@ str_snprintf(char *str, size_t size, const char *format, ...) uint8_t * pktbuf_copy_data(pktbuf_t *pb) { - uint8_t *data = av_malloc(pb->pb_size); + uint8_t *data = av_malloc(pb->pb_size + AV_INPUT_BUFFER_PADDING_SIZE); if (data) memcpy(data, pb->pb_data, pb->pb_size); return data;