From eb282eecb1ea1dd4ac2bd13cae280948c59b8374 Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Wed, 4 Mar 2015 22:19:11 +0100 Subject: [PATCH] fix keyword-buffer overflow --- src/kernel/config.h | 1 - src/keyword.c | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/kernel/config.h b/src/kernel/config.h index a10186e6d..caffedb9e 100644 --- a/src/kernel/config.h +++ b/src/kernel/config.h @@ -81,7 +81,6 @@ extern "C" { #define ORDERSIZE (DISPLAYSIZE*2) /* max. length of an order */ #define NAMESIZE 128 /* max. Länge eines Namens, incl trailing 0 */ #define IDSIZE 16 /* max. Länge einer no (als String), incl trailing 0 */ -#define KEYWORDSIZE 16 /* max. Länge eines Keyword, incl trailing 0 */ #define OBJECTIDSIZE (NAMESIZE+5+IDSIZE) /* max. Länge der Strings, die * von struct unitname, etc. zurückgegeben werden. ohne die 0 */ diff --git a/src/keyword.c b/src/keyword.c index fde981bb9..1ffdc4c3c 100644 --- a/src/keyword.c +++ b/src/keyword.c @@ -12,7 +12,7 @@ const char * keyword(keyword_t kwd) { - static char result[KEYWORDSIZE]; // FIXME: static return value + static char result[32]; // FIXME: static return value if (!result[0]) { strcpy(result, "keyword::"); }