forked from github/server
fix keyword-buffer overflow
This commit is contained in:
parent
cad154ac59
commit
eb282eecb1
|
@ -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 */
|
||||
|
||||
|
|
|
@ -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::");
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue