From: Eric Andersen Date: Wed, 30 Jul 2003 06:52:33 +0000 (-0000) Subject: Ronny L Nilsson writes: X-Git-Tag: 1_00_pre2~8 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=eef2317b9f5bdd362a7b8a0169c688245374f0f5;p=oweals%2Fbusybox.git Ronny L Nilsson writes: If BusyBox was compiled with -DCONFIG_FEATURE_CLEAN_UP dmesg command segfaults if invoked with the "-n" option. (Due to a free() of an uninitialized pointer). --- diff --git a/util-linux/dmesg.c b/util-linux/dmesg.c index 0c0d2d7c0..b7d17840f 100644 --- a/util-linux/dmesg.c +++ b/util-linux/dmesg.c @@ -28,7 +28,11 @@ int dmesg_main(int argc, char **argv) { - char *buf; + char *buf +#ifdef CONFIG_FEATURE_CLEAN_UP + = NULL +#endif + ; int bufsize = 8196; int i, n; int level = 0;