diff --git a/src/elogd.c b/src/elogd.c
index 7f004355..92bcbd1e 100755
--- a/src/elogd.c
+++ b/src/elogd.c
@@ -6,6 +6,9 @@
Contents: Web server program for Electronic Logbook ELOG
$Log$
+ Revision 1.622 2005/04/12 07:11:27 ritt
+ Fixed crash on 'm*' regex search
+
Revision 1.621 2005/04/07 20:19:26 ritt
Fixed compiler warning
@@ -15238,6 +15241,12 @@ void highlight_searchtext(regex_t * re_buf, char *src, char *dst, int hidden)
if (status != REG_NOMATCH) {
size = pmatch[0].rm_so;
+ /* abort if zero length match, for example from "m*" */
+ if (size == 0) {
+ status = REG_NOMATCH;
+ strcpy(pt1, pt);
+ break;
+ }
/* copy first part original text */
memcpy(pt1, pt, size);
pt1 += size;
@@ -17982,7 +17991,7 @@ void show_elog_entry(LOGBOOK * lbs, char *dec_path, char *command)
message_id, orig_message_id, format_flags[MAX_N_ATTR], att_hide[MAX_ATTACHMENTS],
n_attachments, n_lines;
char str[1000], ref[256], file_enc[256], thumb_name[256], attrib[MAX_N_ATTR][NAME_LENGTH];
- char date[80], text[TEXT_SIZE], menu_str[1000], cmd[256],
+ char date[80], text[TEXT_SIZE], menu_str[1000], cmd[256], cmd_enc[256],
orig_tag[80], reply_tag[MAX_REPLY_TO * 10], display[256],
attachment[MAX_ATTACHMENTS][MAX_PATH_LENGTH], encoding[80], locked_by[256],
att[256], lattr[256], mid[80], menu_item[MAX_N_LIST][NAME_LENGTH], format[80],
@@ -18193,19 +18202,27 @@ void show_elog_entry(LOGBOOK * lbs, char *dec_path, char *command)
continue;
if (strieq(cmd, "Copy to") || strieq(cmd, "Move to")) {
-
- rsprintf(" \n", loc(cmd));
- if (strieq(cmd, "Copy to"))
- rsprintf("