mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-06 22:24:33 +02:00
Merge branch 'bugfix/gdbstub_bounds_check' into 'master'
gdbstub: fix array overrun Closes IDF-2786 See merge request espressif/esp-idf!17471
This commit is contained in:
@@ -117,7 +117,7 @@ void esp_gdbstub_tcb_to_regfile(TaskHandle_t tcb, esp_gdbstub_gdb_regfile_t *dst
|
|||||||
int esp_gdbstub_get_signal(const esp_gdbstub_frame_t *frame)
|
int esp_gdbstub_get_signal(const esp_gdbstub_frame_t *frame)
|
||||||
{
|
{
|
||||||
const char exccause_to_signal[] = {4, 31, 11, 11, 2, 6, 8, 0, 6, 7, 0, 0, 7, 7, 7, 7};
|
const char exccause_to_signal[] = {4, 31, 11, 11, 2, 6, 8, 0, 6, 7, 0, 0, 7, 7, 7, 7};
|
||||||
if (frame->exccause > sizeof(exccause_to_signal)) {
|
if (frame->exccause >= sizeof(exccause_to_signal)) {
|
||||||
return 11;
|
return 11;
|
||||||
}
|
}
|
||||||
return (int) exccause_to_signal[frame->exccause];
|
return (int) exccause_to_signal[frame->exccause];
|
||||||
|
Reference in New Issue
Block a user