SciresM / hactool

hactool is a tool to view information about, decrypt, and extract common file formats for the Nintendo Switch, especially Nintendo Content Archives.
ISC License
1.01k stars 155 forks source link

Fixed possibility of missing null-terminator in strncpy(input_name) #64

Closed baconwaifu closed 5 years ago

baconwaifu commented 5 years ago

if the input filename exceeded 512 bytes in length, there exists the possibility of a missing null-terminator for the input filename. this may or may not be problematic in this application, but GCC 8.2 emits a warning about it, and it's best practice to avoid the possibility altogether. It's unlikely that anyone would do this, but it's best to prevent it from breaking things if someone does do this.