Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/videolan/dav1d.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Almer <jamrial@gmail.com>2018-10-20 06:29:29 +0300
committerJames Almer <jamrial@gmail.com>2018-10-20 06:42:29 +0300
commitb004c1a7a1cdba17a42c1de4c2df54b0588c5a77 (patch)
tree9837aa66b3dc39484c9db72b027293bf4ea9206a /tools/input
parent679754e77dd809a607fbd057109be59e7039bd7d (diff)
ivf: fix the conversion specifier in printed error message strings
Fixes stack buffer overflows.
Diffstat (limited to 'tools/input')
-rw-r--r--tools/input/ivf.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/input/ivf.c b/tools/input/ivf.c
index 6362d64..ec27621 100644
--- a/tools/input/ivf.c
+++ b/tools/input/ivf.c
@@ -57,12 +57,12 @@ static int ivf_open(IvfInputContext *const c, const char *const file,
fclose(c->f);
return -1;
} else if (memcmp(hdr, "DKIF", 4)) {
- fprintf(stderr, "%s is not an IVF file [tag=%4s|0x%02x%02x%02x%02x]\n",
+ fprintf(stderr, "%s is not an IVF file [tag=%.4s|0x%02x%02x%02x%02x]\n",
file, hdr, hdr[0], hdr[1], hdr[2], hdr[3]);
fclose(c->f);
return -1;
} else if (memcmp(&hdr[8], "AV01", 4)) {
- fprintf(stderr, "%s is not an AV1 file [tag=%4s|0x%02x%02x%02x%02x]\n",
+ fprintf(stderr, "%s is not an AV1 file [tag=%.4s|0x%02x%02x%02x%02x]\n",
file, &hdr[8], hdr[8], hdr[9], hdr[10], hdr[11]);
fclose(c->f);
return -1;