commit | eef2317b9f5bdd362a7b8a0169c688245374f0f5 | [log] [tgz] |
---|---|---|
author | Eric Andersen <andersen@codepoet.org> | Wed Jul 30 06:52:33 2003 +0000 |
committer | Eric Andersen <andersen@codepoet.org> | Wed Jul 30 06:52:33 2003 +0000 |
tree | 81d07adf59a7dc21ee1f2c5063698b3ebbba5631 | |
parent | eac20451d240eb6cb4881578962de408f622b29b [diff] |
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 0c0d2d7..b7d1784 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;