Back Midas Rome Roody Rootana
  Midas DAQ System  Not logged in ELOG logo
Entry  10 Oct 2008, Konstantin Olchanski, Bug Report, mhttpd "messages" broken 
    Reply  11 Oct 2008, Stefan Ritt, Bug Report, mhttpd "messages" broken 
Message ID: 503     Entry time: 10 Oct 2008     Reply to this: 504
Author: Konstantin Olchanski 
Topic: Bug Report 
Subject: mhttpd "messages" broken 
mhttpd "messages" page stopped working after svn revision 4327 because of uninitialized variable 
"filename2" in midas.c:cm_message_retrieve(). Attached patch fixes the problem for me.
K.O.


--- src/midas.c (revision 4342)
+++ src/midas.c (working copy)
@@ -978,6 +978,8 @@
       size = sizeof(filename);
       db_get_value(hDB, 0, "/Logger/Message file", filename, &size, TID_STRING, TRUE);
 
+      strlcpy(filename2, filename, sizeof(filename2));
+
       if (strchr(filename, '%')) {
          /* replace strings such as midas_%y%m%d.mid with current date */
          tzset();
ELOG V3.1.4-2e1708b5