diff options
-rw-r--r-- | usr.sbin/zic/zic.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/usr.sbin/zic/zic.c b/usr.sbin/zic/zic.c index 109b978..5492648 100644 --- a/usr.sbin/zic/zic.c +++ b/usr.sbin/zic/zic.c @@ -500,7 +500,11 @@ _("more than one -l option specified")); case 'm': { void *set = setmode(optarg); + if (set == NULL) + errx(EXIT_FAILURE, +_("invalid file mode")); getmode(set, mflag); + free(set); break; } case 'p': |