Browse Source

inpcom.c: remove name_buf length limitation

pre-master-46
h_vogt 13 years ago
committed by rlar
parent
commit
321450366e
  1. 4
      src/frontend/inpcom.c

4
src/frontend/inpcom.c

@ -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;

Loading…
Cancel
Save