[FFmpeg-cvslog] avcodec/svq1dec: fix runtime error: applying non-zero offset 4 to null pointer
Paul B Mahol
git at videolan.org
Sat Sep 23 11:05:04 EEST 2023
ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Sat Sep 23 09:57:06 2023 +0200| [cb26b85953464c7f39fcf20ae4443526deed4bd6] | committer: Paul B Mahol
avcodec/svq1dec: fix runtime error: applying non-zero offset 4 to null pointer
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=cb26b85953464c7f39fcf20ae4443526deed4bd6
---
libavcodec/svq1dec.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/libavcodec/svq1dec.c b/libavcodec/svq1dec.c
index 33217739b2..8563b29164 100644
--- a/libavcodec/svq1dec.c
+++ b/libavcodec/svq1dec.c
@@ -282,7 +282,7 @@ static int svq1_decode_block_non_intra(GetBitContext *bitbuf, uint8_t *pixels,
SVQ1_CALC_CODEBOOK_ENTRIES(ff_svq1_inter_codebooks);
for (y = 0; y < height; y++) {
- for (x = 0; x < width / 4; x++, codebook++) {
+ for (x = 0; x < width / 4; x++) {
n3 = dst[x];
/* add mean value to vector */
n1 = n4 + ((n3 & 0xFF00FF00) >> 8);
@@ -290,6 +290,8 @@ static int svq1_decode_block_non_intra(GetBitContext *bitbuf, uint8_t *pixels,
SVQ1_ADD_CODEBOOK()
/* store result */
dst[x] = n1 << 8 | n2;
+ if (codebook != NULL)
+ codebook++;
}
dst += pitch / 4;
}
More information about the ffmpeg-cvslog
mailing list