Browse Source

inpcom.c: prevent invalid memory read/write

pre-master-46
h_vogt 14 years ago
parent
commit
d0f58dc5a6
  1. 2
      src/frontend/inpcom.c

2
src/frontend/inpcom.c

@ -5525,7 +5525,7 @@ inp_add_series_resistor(struct line *deck)
node1 = gettok(&cut_line); node1 = gettok(&cut_line);
node2 = gettok(&cut_line); node2 = gettok(&cut_line);
/* new L line */ /* new L line */
xlen = strlen(curr_line) + 9;
xlen = strlen(curr_line) + 10;
ckt_array[0] = TMALLOC(char, xlen); ckt_array[0] = TMALLOC(char, xlen);
sprintf(ckt_array[0], "%s %s %s_intern__ %s", sprintf(ckt_array[0], "%s %s %s_intern__ %s",
title_tok, node1, node2, cut_line); title_tok, node1, node2, cut_line);

Loading…
Cancel
Save