inpcom.c: remove name_buf length limitation

This commit is contained in:
h_vogt 2013-09-08 15:23:26 +02:00 committed by rlar
parent 1bb7079dc5
commit 321450366e
1 changed files with 2 additions and 2 deletions

View File

@ -3544,7 +3544,7 @@ get_number_terminals(char *c)
{
int i, j, k;
char *name[12];
char nam_buf[33];
char nam_buf[128];
bool area_found = FALSE;
switch (*c) {
@ -3579,7 +3579,7 @@ get_number_terminals(char *c)
/* find the first token with "off" or "=" in the line*/
while ((i < 20) && (*c != '\0')) {
char *inst = gettok_instance(&c);
strncpy(nam_buf, inst, 32);
strncpy(nam_buf, inst, sizeof(nam_buf) - 1);
txfree(inst);
if (strstr(nam_buf, "off") || strchr(nam_buf, '='))
break;