mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-12-26 17:18:55 +00:00
macro.c:871 heap-buffer-overflow
PR 32391 commit 9f2e3c21f6 fallout again. Also fix another 'macro'
may be used uninitialized.
This commit is contained in:
@@ -868,7 +868,7 @@ sub_actual (size_t start, sb *in, sb *t, struct htab *formal_hash,
|
|||||||
/* The parent's FORMALs might contain parameters that need further
|
/* The parent's FORMALs might contain parameters that need further
|
||||||
substitution. See gas/testsuite/gas/arm/macro-vld1.s for an
|
substitution. See gas/testsuite/gas/arm/macro-vld1.s for an
|
||||||
example of this. */
|
example of this. */
|
||||||
if (strchr (add->ptr, '\\'))
|
if (memchr (add->ptr, '\\', add->len))
|
||||||
{
|
{
|
||||||
sb newadd;
|
sb newadd;
|
||||||
|
|
||||||
@@ -1485,7 +1485,7 @@ delete_macro (const char *name)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (macro == NULL)
|
if (j < 0)
|
||||||
as_warn (_("Attempt to purge non-existing macro `%s'"), copy);
|
as_warn (_("Attempt to purge non-existing macro `%s'"), copy);
|
||||||
|
|
||||||
free (copy);
|
free (copy);
|
||||||
|
|||||||
Reference in New Issue
Block a user