From f6e985250024ba4a4d3178515e36e519b9043a8d Mon Sep 17 00:00:00 2001 From: "L. Pereira" Date: Mon, 27 Jan 2025 22:32:06 -0800 Subject: [PATCH] Limit word names to 64 characters --- src/samples/forthsalon/forth.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/samples/forthsalon/forth.c b/src/samples/forthsalon/forth.c index 70165051b..13c7cbcce 100644 --- a/src/samples/forthsalon/forth.c +++ b/src/samples/forthsalon/forth.c @@ -316,6 +316,9 @@ static struct forth_word *new_word(struct forth_ctx *ctx, void *callback, bool compiler) { + if (len > 64) + return NULL; + struct forth_word *word = malloc(sizeof(*word) + len + 1); if (UNLIKELY(!word)) return NULL;