Created attachment 367019 [details] the fix Description of problem: strace crashes for me because of the memory corruption. Version-Release number of selected component (if applicable): strace-4.5.18-2.fc11.x86_64 How reproducible: Always Steps to Reproduce: 1. strace -f -o log mkinitrd initrd-`uname -r`.img `uname -r` Actual results: Segmentation fault after some time Expected results: Correct tracing of mkinitrd Additional info: The attached patch fixes the problem. string_quote() expects the size of 'outstr' to be at least size*4+3 (actually, as the code there is very sloppy, even this may not always hold). And size=max_strlen+1, but the buffer allocated is max_strlen*4+6, which is less than (max_strlen+1)*4+3 by one byte. All this code is very bad and unsafe, Who writes the code like this? :)
Fxied in 4.5.19.