Static buffers are evil. Allocate it dynamically instead.

This was taken from gas-2.9.1
This commit is contained in:
kristerw 1999-01-10 00:32:33 +00:00
parent b2acf0b9f2
commit be7b817514
1 changed files with 3 additions and 1 deletions

View File

@ -2340,7 +2340,7 @@ i386_operand (operand_string)
*/
register char *cp;
if ((cp = strchr (input_line_pointer,'@')) != NULL) {
char tmpbuf[BUFSIZ];
char *tmpbuf;
if(!GOT_symbol) {
#if defined(TE_NetBSD) && defined(OBJ_AOUT)
@ -2356,6 +2356,8 @@ i386_operand (operand_string)
#endif
}
tmpbuf = (char *) alloca ((cp - input_line_pointer) + 20);
if (strncmp(cp+1, "PLT", 3) == 0) {
i.disp_reloc[this_operand] = BFD_RELOC_386_PLT32;
*cp = '\0';