ldlinux: Fix return pointer to local data
commit8dc6d758b564a1ccc44c3ae11f265d43628219ce
authorSylvain Gault <sylvain.gault@gmail.com>
Tue, 13 Oct 2015 04:18:07 +0000 (13 06:18 +0200)
committerPaulo Alcantara <pcacjr@zytor.com>
Sun, 18 Oct 2015 15:56:32 +0000 (18 12:56 -0300)
treeced78bc1683aa2f117345b943d7f9b9955a3704c
parent9e0926bb338deb5c634ccb4ee29eb4577158cfdc
ldlinux: Fix return pointer to local data

The command-line parsing used to return a pointer to a local array. The
code used to work by chance, but now, gcc 5 is able to detect it and
return a NULL pointer instead.

The buffer is now marked static. This shouldn't be a problem as only one
command line can be read at a time.

Signed-off-by: Sylvain Gault <sylvain.gault@gmail.com>
Tested-by: poma <pomidorabelisima at gmail.com>
Signed-off-by: Paulo Alcantara <pcacjr@zytor.com>
com32/elflink/ldlinux/cli.c