diff mbox series

[FFmpeg-devel,6/6] avcodec/movtextdec: Fix wrong error code

Message ID AM7PR03MB6660C5A9F393F2A8B808146C8F6F9@AM7PR03MB6660.eurprd03.prod.outlook.com
State Accepted
Commit 41b077762cda61a6975dabee9f58444815794619
Headers show
Series [FFmpeg-devel,1/6] avcodec/movtextdec: Switch to smaller type | expand

Checks

Context Check Description
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished
andriy/make_ppc success Make finished
andriy/make_fate_ppc success Make fate finished

Commit Message

Andreas Rheinhardt Dec. 8, 2021, 8:23 p.m. UTC
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
 libavcodec/movtextdec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/libavcodec/movtextdec.c b/libavcodec/movtextdec.c
index 63709eb54b..825632ca9b 100644
--- a/libavcodec/movtextdec.c
+++ b/libavcodec/movtextdec.c
@@ -294,7 +294,7 @@  static int decode_styl(const uint8_t *tsmb, MovTextContext *m, uint64_t size)
         if (style->end < style->start ||
             (i && style->start < m->s[i - 1].end)) {
             mov_text_cleanup(m);
-            return AVERROR(ENOMEM);
+            return AVERROR_INVALIDDATA;
         }
         if (style->start == style->end) {
             /* Skip this style as it applies to no character */