asan: unwind-ia64.c: stack buffer overflow
Printing "invalid" is better than printing an uninitialised buffer and occasionally running off the end of the buffer. * unwind-ia64.c (unw_print_xyreg): Don't leave output buffer uninitialised on invalid input.
This commit is contained in:
parent
cca043e071
commit
de8d420310
@ -1,3 +1,8 @@
|
||||
2021-02-07 Alan Modra <amodra@gmail.com>
|
||||
|
||||
* unwind-ia64.c (unw_print_xyreg): Don't leave output buffer
|
||||
uninitialised on invalid input.
|
||||
|
||||
2021-02-06 Alan Modra <amodra@gmail.com>
|
||||
|
||||
PR 27349
|
||||
|
@ -156,6 +156,10 @@ unw_print_xyreg (char *cp, unsigned int x, unsigned int ytreg)
|
||||
case 2: /* br */
|
||||
sprintf (cp, "b%u", (ytreg & 0x1f));
|
||||
break;
|
||||
|
||||
default:
|
||||
strcpy (cp, "invalid");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user