From 5637d515fbda62e7c8ec39d0c993d11e02130cb6 Mon Sep 17 00:00:00 2001 From: Ada Christine Date: Mon, 7 Feb 2022 10:34:07 +0000 Subject: small bug in kprint.c --- kc/core/kprint.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/kc/core/kprint.c b/kc/core/kprint.c index ee2c39b..bc8db69 100644 --- a/kc/core/kprint.c +++ b/kc/core/kprint.c @@ -30,6 +30,12 @@ static char *convert_scalar( { static const char *stringdigits = "0123456789abcdef"; + // we cannot use a base > 16 currently + if (base > 16) + { + return NULL; + } + // the string will be built from the lower-to-higher value, and the // result pointer will point to the first character of the string in // the supplied buffer -- cgit v1.3.1-1-g115d