From 067ad2653148ad77eeb319181e3b1e9d07d4bee2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?IOhannes=20m=20zm=C3=B6lnig?= Date: Mon, 9 Dec 2013 16:31:49 +0000 Subject: fix out-of-bound array access invalid binary files might result in negative symtable indices. this patch should prevent a crash in these cases... svn path=/trunk/externals/miXed/; revision=17227 --- shared/common/binport.c | 1 + 1 file changed, 1 insertion(+) diff --git a/shared/common/binport.c b/shared/common/binport.c index 90cf251..b5f5e72 100644 --- a/shared/common/binport.c +++ b/shared/common/binport.c @@ -462,6 +462,7 @@ static t_symbol *binport_makesymbol(t_binport *bp, int id) static int binport_setbysymtable(t_binport *bp, t_atom *ap, int id) { t_symbol *s; + if(id<0) return 0; if (id < bp->b_nsymbols) s = bp->b_symtable[id]; else -- cgit v1.2.1