about summary refs log tree commit diff
path: root/Src/math.c
diff options
context:
space:
mode:
Diffstat (limited to 'Src/math.c')
-rw-r--r--Src/math.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/Src/math.c b/Src/math.c
index e1cde5f03..3374efddd 100644
--- a/Src/math.c
+++ b/Src/math.c
@@ -460,6 +460,10 @@ zzlex(void)
 		}
 		if(*ptr != ']')
 			goto bofs;
+		if (outputradix < 2 || outputradix > 36) {
+		    zerr("invalid base: %d", outputradix);
+		    return EOI;
+		}
 		ptr++;
 		break;
 	    }