public
/
FUZIX.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
82d7e59
)
ld: trap more obvious symbol errors
author
Alan Cox
<alan@linux.intel.com>
Wed, 15 Nov 2017 21:07:54 +0000
(21:07 +0000)
committer
Alan Cox
<alan@linux.intel.com>
Wed, 15 Nov 2017 21:07:54 +0000
(21:07 +0000)
Applications/MWC/cmd/asz80/ld.c
patch
|
blob
|
history
diff --git
a/Applications/MWC/cmd/asz80/ld.c
b/Applications/MWC/cmd/asz80/ld.c
index
657486f
..
032c6ff
100644
(file)
--- a/
Applications/MWC/cmd/asz80/ld.c
+++ b/
Applications/MWC/cmd/asz80/ld.c
@@
-409,7
+409,7
@@
static struct object *load_object(FILE * fp, off_t off, int lib, const char *pat
compatible_obj(&o->oh);
/* Load up the symbols */
nsym = (o->oh.o_dbgbase - o->oh.o_symbase) / S_SIZE;
- if (nsym < 0)
+ if (nsym < 0
||nsym > 65535
)
error("bad object file");
/* Allocate the symbol entries */
o->syment = (struct symbol **) xmalloc(sizeof(struct symbol *) * nsym);