From: Ralph Corderoy Date: Sun, 10 Sep 2017 12:29:46 +0000 (+0100) Subject: get_file_info(): Don't dereference out of scope char array. X-Git-Url: https://diplodocus.org/git/nmh/commitdiff_plain/b04d3a5bfe54b5e828a998f3e56bd97d6f82df1d?ds=sidebyside;hp=b04d3a5bfe54b5e828a998f3e56bd97d6f82df1d get_file_info(): Don't dereference out of scope char array. A pointer to `char buf[...]' is taken, the array being declared in a block scope inside the function. The pointer is passed to strdup(3) as the function returned, but the array is by then out of scope. Move the array to the function's scope. Fixes 0c50c669. ---