]> diplodocus.org Git - nmh/commit
get_file_info(): Don't dereference out of scope char array.
authorRalph Corderoy <ralph@inputplus.co.uk>
Sun, 10 Sep 2017 12:29:46 +0000 (13:29 +0100)
committerRalph Corderoy <ralph@inputplus.co.uk>
Sun, 10 Sep 2017 12:29:46 +0000 (13:29 +0100)
commitb04d3a5bfe54b5e828a998f3e56bd97d6f82df1d
treed7f9c91daa6b279954aa157b1c61729d5a888fc8
parente5479da8544d4fe47a320934667cb91c1c6a309e
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.
sbr/mime_type.c