From 15c0a2b9395072fe57a65ca99b1f89ce024e4687 Mon Sep 17 00:00:00 2001 From: Stefan Ritt Date: Mon, 19 Feb 2007 09:00:51 +0000 Subject: [PATCH] Fixed problem with preset string containing '%' SVN revision: 1793 --- src/elogd.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/elogd.c b/src/elogd.c index 6d2c708b..1d001b77 100755 --- a/src/elogd.c +++ b/src/elogd.c @@ -5127,8 +5127,8 @@ int el_lock_message(LOGBOOK * lbs, int message_id, char *user) void write_logfile(LOGBOOK * lbs, const char *text) { - char file_name[2000]; - char str[10000], unm[256]; + char file_name[MAX_PATH_LENGTH]; + char str[MAX_PATH_LENGTH], unm[256]; int fh; time_t now; char buf[10000]; @@ -8691,14 +8691,13 @@ void show_edit_form(LOGBOOK * lbs, int message_id, BOOL breply, BOOL bedit, BOOL strsubst_list(preset, sizeof(preset), slist, svalue, i); /* check for index substitution */ - if (!bedit && (strchr(preset, '%') || strchr(preset, '#'))) { + if (!bedit && strchr(preset, '#')) { /* get index */ get_auto_index(lbs, index, preset, str, sizeof(str)); strcpy(preset, str); } - if (!strchr(preset, '%')) - strcpy(attrib[index], preset); + strcpy(attrib[index], preset); } }