ipcalc: segmentation fault
Cristian Ionescu-Idbohrn
cristian.ionescu-idbohrn at axis.com
Sat Sep 24 09:56:53 UTC 2005
On Sat, 24 Sep 2005, Cristian Ionescu-Idbohrn wrote:
> ipcalc run without arguments segfaults:
>
> # ./busybox ipcalc -n
> segmentation fault
>
> I have verified this on the latest snapshot.
Patch attached, please apply.
Cheers,
Cristian
-------------- next part --------------
--- networking/ipcalc.c.orig 2005-09-24 09:20:22.000000000 +0200
+++ networking/ipcalc.c 2005-09-24 11:52:10.000000000 +0200
@@ -100,6 +100,9 @@
"mbn"
#endif
);
+ if (argc - optind < 1) {
+ bb_error_msg_and_die("missing IP address argument");
+ }
if (mode & (BROADCAST | NETWORK | NETPREFIX)) {
if (argc - optind > 2) {
bb_show_usage();
More information about the busybox
mailing list