[git commit] ls: fix SEGV when --color is used and ENABLE_LS_COLOR=n

Denys Vlasenko vda.linux at googlemail.com
Sun May 26 11:53:41 UTC 2019


commit: https://git.busybox.net/busybox/commit/?id=9501bc7da5f560f3dae6f6a1d2b11efa9d5dfe47
branch: https://git.busybox.net/busybox/commit/?id=refs/heads/master

Signed-off-by: Denys Vlasenko <vda.linux at googlemail.com>
---
 coreutils/ls.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/coreutils/ls.c b/coreutils/ls.c
index b2adb0c06..e5375a61a 100644
--- a/coreutils/ls.c
+++ b/coreutils/ls.c
@@ -1086,7 +1086,7 @@ int ls_main(int argc UNUSED_PARAM, char **argv)
 	static const char ls_longopts[] ALIGN1 =
 		"full-time\0" No_argument "\xff"
 		"group-directories-first\0" No_argument "\xfe"
-		"color\0" Optional_argument "\xfd"
+		IF_FEATURE_LS_COLOR("color\0" Optional_argument "\xfd")
 	;
 #endif
 


More information about the busybox-cvs mailing list