diff options
author | IOhannes m zmölnig <zmoelnig@users.sourceforge.net> | 2013-12-09 16:31:49 +0000 |
---|---|---|
committer | IOhannes m zmölnig <zmoelnig@users.sourceforge.net> | 2013-12-09 16:31:49 +0000 |
commit | 067ad2653148ad77eeb319181e3b1e9d07d4bee2 (patch) | |
tree | 27c5a9482b5bbf0e6955df4bc3b5badf68768523 /shared/common | |
parent | 59a9567472dfdad14892a938fd6f2a8409fc5600 (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
Diffstat (limited to 'shared/common')
-rw-r--r-- | shared/common/binport.c | 1 |
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 |