m4: Fix OOB access displaying MIN_INT

Previously displaying INT_MIN resulted in an out of bounds access to
digits[-8].  In twos-complement -INT_MIN is still negative.

PR:		287013
Reviewed by:	emaste
This commit is contained in:
Eric Blake 2025-05-24 13:21:38 -04:00 committed by Ed Maste
parent ac196a5845
commit ab4edcd552

View file

@ -121,7 +121,7 @@ void
pbnumbase(int n, int base, int d)
{
static char digits[36] = "0123456789abcdefghijklmnopqrstuvwxyz";
int num;
unsigned int num;
int printed = 0;
if (base > 36)