MEGA65 / mega65-tools

Tools and Utilities for the MEGA65 Retro Computers
GNU General Public License v3.0
30 stars 31 forks source link

romdiff: string buffer overflow protection, more verbose usage string #103

Closed lydon42 closed 2 years ago

lydon42 commented 2 years ago

The snprintfs into the header had the wrong length, you need to specify the real string lenght or the terminating \0 is not written correctly. Also added a overflow check to normalise. Check argv 1+2 before diffing if they are not bigger than the header allows. More verbose usage string.