blind

suckless command-line video editing utility
git clone git://git.suckless.org/blind
Log | Files | Refs | README | LICENSE

commit 592a6b8d77977a4eba3287b4b4c80710f84d3899
parent bc7830ba80267a4a228ed1de62e0f65045b3d174
Author: Mattias Andrée <maandree@kth.se>
Date:   Thu, 12 Jan 2017 12:35:11 +0100

Fix header size limit

Signed-off-by: Mattias Andrée <maandree@kth.se>

Diffstat:
Msrc/vu-concat.c | 2+-
Msrc/vu-read-head.c | 2+-
Msrc/vu-rewrite-head.c | 2+-
3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/vu-concat.c b/src/vu-concat.c @@ -49,7 +49,7 @@ concat_to_file(int argc, char *argv[], char *output_file) struct stream stream, refstream; int first = 0; int fd = eopen(output_file, O_RDWR | O_CREAT | O_TRUNC, 0666); - char head[3 * sizeof(size_t) + 4 + sizeof(stream.pixfmt) + 6]; + char head[3 * 3 * sizeof(size_t) + sizeof(stream.pixfmt) + 10]; ssize_t headlen, size = 0; char *data; diff --git a/src/vu-read-head.c b/src/vu-read-head.c @@ -10,7 +10,7 @@ USAGE("") int main(int argc, char *argv[]) { - char buf[2 + 3 * sizeof(size_t) + sizeof(((struct stream *)0)->pixfmt)]; + char buf[4 + 3 * 3 * sizeof(size_t) + sizeof(((struct stream *)0)->pixfmt)]; char magic[] = {'\0', 'u', 'i', 'v', 'f'}; char b, *p; size_t i, ptr; diff --git a/src/vu-rewrite-head.c b/src/vu-rewrite-head.c @@ -15,7 +15,7 @@ USAGE("[-h] file [(frames | 'auto') [(width | 'same') (height | 'same') [format static void rewrite(struct stream *stream, int frames_auto) { - char head[3 * sizeof(size_t) + 4 + sizeof(stream->pixfmt) + 6]; + char head[3 * 3 * sizeof(size_t) + sizeof(stream->pixfmt) + 10]; ssize_t headlen; size_t frame_size, frame_count, length; struct stat st;