diff options
Diffstat (limited to 'gst-libs/ext/libav/libavutil')
-rw-r--r-- | gst-libs/ext/libav/libavutil/aarch64/asm.S | 4 | ||||
-rw-r--r-- | gst-libs/ext/libav/libavutil/lzo.c | 10 |
2 files changed, 11 insertions, 3 deletions
diff --git a/gst-libs/ext/libav/libavutil/aarch64/asm.S b/gst-libs/ext/libav/libavutil/aarch64/asm.S index 94e5a84..6608472 100644 --- a/gst-libs/ext/libav/libavutil/aarch64/asm.S +++ b/gst-libs/ext/libav/libavutil/aarch64/asm.S @@ -55,8 +55,8 @@ ELF .size \name, . - \name .macro movrel rd, val #if CONFIG_PIC - adrp \rd, #:pg_hi21:\val - add \rd, \rd, #:lo12:\val + adrp \rd, :pg_hi21:\val + add \rd, \rd, :lo12:\val #else ldr \rd, =\val #endif diff --git a/gst-libs/ext/libav/libavutil/lzo.c b/gst-libs/ext/libav/libavutil/lzo.c index 5c5ebc8..e458165 100644 --- a/gst-libs/ext/libav/libavutil/lzo.c +++ b/gst-libs/ext/libav/libavutil/lzo.c @@ -80,6 +80,10 @@ static inline void copy(LZOContext *c, int cnt) { register const uint8_t *src = c->in; register uint8_t *dst = c->out; + if (cnt < 0) { + c->error |= AV_LZO_ERROR; + return; + } if (cnt > c->in_end - src) { cnt = FFMAX(c->in_end - src, 0); c->error |= AV_LZO_INPUT_DEPLETED; @@ -103,7 +107,7 @@ static inline void copy(LZOContext *c, int cnt) /** * @brief Copies previously decoded bytes to current position. * @param back how many bytes back we start - * @param cnt number of bytes to copy, must be >= 0 + * @param cnt number of bytes to copy, must be > 0 * * cnt > back is valid, this will copy the bytes we just copied, * thus creating a repeating pattern with a period length of back. @@ -111,6 +115,10 @@ static inline void copy(LZOContext *c, int cnt) static inline void copy_backptr(LZOContext *c, int back, int cnt) { register uint8_t *dst = c->out; + if (cnt <= 0) { + c->error |= AV_LZO_ERROR; + return; + } if (dst - c->out_start < back) { c->error |= AV_LZO_INVALID_BACKPTR; return; |