Fix a NULL-derference found by jasper@ with AFL++ (port coming soon!).
ok jasper@
-/* $OpenBSD: btrace.c,v 1.44 2021/09/01 08:01:09 mpi Exp $ */
+/* $OpenBSD: btrace.c,v 1.45 2021/09/01 13:21:24 mpi Exp $ */
/*
* Copyright (c) 2019 - 2021 Martin Pieuchot <mpi@openbsd.org>
debug("bv=%p read '%s' (%p)\n", bv, bv_name(bv), bv->bv_value);
+ /* Handle map/hist access after clear(). */
+ if (bv->bv_value == NULL)
+ return &g_nullba;
+
return bv->bv_value;
}