Fixed buffer overflow

SVN revision: 1912
This commit is contained in:
Stefan Ritt 2007-09-06 19:19:07 +00:00
parent 1720f2e945
commit cc5db91d04

View File

@ -19327,7 +19327,7 @@ void show_elog_list(LOGBOOK * lbs, int past_n, int last_n, int page_n, BOOL defa
for (i = 0; i < n_attr_disp; i++) { for (i = 0; i < n_attr_disp; i++) {
/* assemble current command line, replace sort statements */ /* assemble current command line, replace sort statements */
strcpy(ref, getparam("cmdline")); strlcpy(ref, getparam("cmdline"), sizeof(ref));
strlcpy(str, disp_attr[i], sizeof(str)); strlcpy(str, disp_attr[i], sizeof(str));
url_encode(str, sizeof(str)); url_encode(str, sizeof(str));
@ -19615,7 +19615,6 @@ void show_elog_list(LOGBOOK * lbs, int past_n, int last_n, int page_n, BOOL defa
for (i = 0; i < lbs->n_attr; i++) for (i = 0; i < lbs->n_attr; i++)
regfree(re_buf + 1 + i); regfree(re_buf + 1 + i);
xfree(slist); xfree(slist);
xfree(svalue); xfree(svalue);
xfree(gattr); xfree(gattr);