aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIOhannes m zmölnig <zmoelnig@users.sourceforge.net>2013-12-09 16:31:49 +0000
committerIOhannes m zmölnig <zmoelnig@users.sourceforge.net>2013-12-09 16:31:49 +0000
commit067ad2653148ad77eeb319181e3b1e9d07d4bee2 (patch)
tree27c5a9482b5bbf0e6955df4bc3b5badf68768523
parent59a9567472dfdad14892a938fd6f2a8409fc5600 (diff)
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
-rw-r--r--shared/common/binport.c1
1 files changed, 1 insertions, 0 deletions
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