EtchedPixels / EmulatorKit

A collection of emulators mostly of retrobrew style systems
GNU General Public License v3.0
142 stars 41 forks source link

Fix out of bounds sprintf issue in newer GCCs #25

Closed pcem-maintainer closed 3 years ago

pcem-maintainer commented 3 years ago

make_signed_hex_str_32() allocates 20 bytes for its return string. It will never use as much, but get_imm_str_s() merges it into a string of only 15 bytes, making gcc 10.2 throw an error.

Changed the string size in make_signed_hex_str_32() to the maximum possible value to avoid this error.

pcem-maintainer commented 3 years ago

Heh, just realized this same pull request was sent by lots of people already. :-)