aboutsummaryrefslogtreecommitdiff
path: root/gdb/addrmap.h
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2024-09-28 08:03:36 +0930
committerAlan Modra <amodra@gmail.com>2024-09-28 15:47:47 +0930
commiteb5903a8e268ac4615f9f96a8254b0b72f585e07 (patch)
tree4eda0fc0e54822a6f4704276159b1be876bdbb76 /gdb/addrmap.h
parentf6abafcd91fcdc63d301314c828989b39e061092 (diff)
downloadgdb-eb5903a8e268ac4615f9f96a8254b0b72f585e07.zip
gdb-eb5903a8e268ac4615f9f96a8254b0b72f585e07.tar.gz
gdb-eb5903a8e268ac4615f9f96a8254b0b72f585e07.tar.bz2
gas buffer overflow with --listing-rhs-width
With listings enabled, gas keeps a small cache of source lines. They are stored in buffers of size LISTING_RHS_WIDTH, ie. 100. Given listing-rhs-width larger than 100 it is of course possible to overflow the buffer. Fix that by allocating as needed. We could allocate all buffers on the first call to print_source using listing_rhs_width, but I chose not to do that in case some future assembly directive allows changes to listing_rhs_width similarly to the way paper_width can change during assembly.
Diffstat (limited to 'gdb/addrmap.h')
0 files changed, 0 insertions, 0 deletions