t-ar overflows arh.ar_name by two bytes: one because the string it uses is 17 bytes long rather than 16, and one because it uses strcpy which writes a trailing \0. When compiling with -D_FORTIFY_SOURCE=2, as Ubuntu does by default, this crashes. Fix the string length and stop null-terminating it.
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||