fix crash when passing empty cli arguments as B_AT_NIL wasn't handled as a valid...
authorjasper <jasper@openbsd.org>
Thu, 9 Sep 2021 20:07:49 +0000 (20:07 +0000)
committerjasper <jasper@openbsd.org>
Thu, 9 Sep 2021 20:07:49 +0000 (20:07 +0000)
found with afl++
ok mpi@

usr.sbin/btrace/btrace.c

index 371ddf6..601b205 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: btrace.c,v 1.55 2021/09/09 11:20:40 mpi Exp $ */
+/*     $OpenBSD: btrace.c,v 1.56 2021/09/09 20:07:49 jasper Exp $ */
 
 /*
  * Copyright (c) 2019 - 2021 Martin Pieuchot <mpi@openbsd.org>
@@ -1437,6 +1437,7 @@ ba2dtflags(struct bt_arg *ba)
                case B_AT_LONG:
                case B_AT_VAR:
                case B_AT_HIST:
+               case B_AT_NIL:
                        break;
                case B_AT_BI_KSTACK:
                        flags |= DTEVT_KSTACK;