Ronny L Nilsson writes:
authorEric Andersen <andersen@codepoet.org>
Wed, 30 Jul 2003 06:52:33 +0000 (06:52 -0000)
committerEric Andersen <andersen@codepoet.org>
Wed, 30 Jul 2003 06:52:33 +0000 (06:52 -0000)
    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).

util-linux/dmesg.c

index 0c0d2d7c0a0c190d8ab55fa547f97553f59f9984..b7d17840f697dfff271094a18f796c04ab88a803 100644 (file)
 
 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;