Upstream fix for CVE-2015-6749. https://trac.xiph.org/ticket/2212 From 04815d3e1bfae3a6cdfb2c25358a5a72b61299f7 Mon Sep 17 00:00:00 2001 From: Mark Harris Date: Sun, 30 Aug 2015 05:54:46 -0700 Subject: [PATCH] oggenc: Fix large alloca on bad AIFF input Fixes #2212 --- oggenc/audio.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/oggenc/audio.c b/oggenc/audio.c index 477da8c..4921fb9 100644 --- a/oggenc/audio.c +++ b/oggenc/audio.c @@ -245,8 +245,8 @@ static int aiff_permute_matrix[6][6] = int aiff_open(FILE *in, oe_enc_opt *opt, unsigned char *buf, int buflen) { int aifc; /* AIFC or AIFF? */ - unsigned int len; - unsigned char *buffer; + unsigned int len, readlen; + unsigned char buffer[22]; unsigned char buf2[8]; aiff_fmt format; aifffile *aiff = malloc(sizeof(aifffile)); @@ -269,9 +269,9 @@ int aiff_open(FILE *in, oe_enc_opt *opt, unsigned char *buf, int buflen) return 0; /* Weird common chunk */ } - buffer = alloca(len); - - if(fread(buffer,1,len,in) < len) + readlen = len < sizeof(buffer) ? len : sizeof(buffer); + if(fread(buffer,1,readlen,in) < readlen || + (len > readlen && !seek_forward(in, len-readlen))) { fprintf(stderr, _("Warning: Unexpected EOF in reading AIFF header\n")); return 0; -- 2.5.0 c4fe1004b093cda46dc249012688f560544ada'>commitdiff
path: root/gnu/build/marionette.scm
AgeCommit message (Expand)Author
2020-02-22marionette: Provide portable US-layout keystrokes for "<" and ">"....Ludovic Courtès
2020-02-22marionette: 'wait-for' procedures no longer leak a port....Ludovic Courtès
2019-05-15marionette: Add braces to the keystrokes....Ludovic Courtès
2018-08-28marionette: Add wait-for-unix-socket....Chris Marusich
2018-08-28marionette: Add support for QEMU's "quit" command....Chris Marusich
2018-06-01marionette: Add 'wait-for-tcp-port'....Ludovic Courtès
2018-02-19marionette: Use QEMU's "VM channel" mechanism....Ludovic Courtès
2017-09-08marionette: 'wait-for-file' can be passed a read procedure....Ludovic Courtès
2017-08-28marionette: Augment the set of keystrokes....Ludovic Courtès
2017-08-28marionette: Fix typing of capital letters....Ludovic Courtès
2017-08-28marionette: 'wait-for-file' really raises an error when a file is missing....Ludovic Courtès
2017-06-12marionette: Factorize 'wait-for-file'....Ludovic Courtès
2016-11-23install: Enable "cryptodisk" handling in GRUB....Ludovic Courtès
2016-11-23marionette: Add 'marionette-screen-text' using OCR....Ludovic Courtès
2016-11-23marionette: Delay synchronization with the host's REPL....Ludovic Courtès
2016-11-22marionette: Avoid use of SIGALRM for timeouts....Ludovic Courtès
2016-05-04Add (gnu tests) and (gnu build marionette)....Ludovic Courtès