diff mbox series

[FFmpeg-devel] tools/target_dem_fuzzer: Implement AVSEEK_SIZE

Message ID 20200607233541.29196-1-michael@niedermayer.cc
State Accepted
Commit 3e651eeac4001820a4b1ac6a31974753288bb9ed
Headers show
Series [FFmpeg-devel] tools/target_dem_fuzzer: Implement AVSEEK_SIZE | expand

Checks

Context Check Description
andriy/default pending
andriy/make success Make finished
andriy/make_fate success Make fate finished

Commit Message

Michael Niedermayer June 7, 2020, 11:35 p.m. UTC
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
---
 tools/target_dem_fuzzer.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Michael Niedermayer June 8, 2020, 10:27 a.m. UTC | #1
On Mon, Jun 08, 2020 at 01:35:41AM +0200, Michael Niedermayer wrote:
> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
> ---
>  tools/target_dem_fuzzer.c | 2 ++
>  1 file changed, 2 insertions(+)

will apply


[...]
diff mbox series

Patch

diff --git a/tools/target_dem_fuzzer.c b/tools/target_dem_fuzzer.c
index 409599636d..cc097da0d7 100644
--- a/tools/target_dem_fuzzer.c
+++ b/tools/target_dem_fuzzer.c
@@ -70,6 +70,8 @@  static int64_t io_seek(void *opaque, int64_t offset, int whence)
         if (offset > INT64_MAX - c->filesize)
             return -1;
         offset += c->filesize;
+    } else if (whence == AVSEEK_SIZE) {
+        return c->filesize;
     }
     if (offset < 0 || offset > c->filesize)
         return -1;