Demo Discussion
Forum Config Examples Contributions Vulnerabilities
  Discussion forum about ELOG, Page 209 of 793  Not logged in ELOG logo
ID Date Icon Author Author Email Category OS ELOG Version Subjectup
  68844   Wed Sep 12 20:52:22 2018 Reply Andreas Luedekeandreas.luedeke@psi.chBug reportLinux3.1.3Re: Compile issues on Fedora withe current elog source

Stefan said "code is commited": that means you can download the latest version from https://bitbucket.org/ritt/elog, as described in https://elog.psi.ch/elog/download.html, and then compile it. Clear now?

Stefan Ritt wrote:

This warning is triggered by the use of the sprintf() funciton, which can write beyond the boundary of the destination string. I replaced it by snprintf(), which should make the compiler happy. Code is committed. Unfortuantely I have no FC27 here, so if there is still some waring with the current code, please post the full warning list here.

Stefan

 

  68845   Thu Sep 13 06:12:59 2018 Reply Allen TuttleAllenEmail@wavecable.comBug reportLinux3.1.3Re: Compile issues on Fedora withe current elog source

Latest compile effort on Fedora 28 using the bitbucket source downloaded at 21:12 PDT:

make
gcc -O3 -funroll-loops -fomit-frame-pointer -W -Wall -Wno-deprecated-declarations -Imxml -DHAVE_SSL -c -o mxml.o mxml/mxml.c
mxml/mxml.c: In function ‘mxml_write_attribute.part.1’:
mxml/mxml.c:515:25: warning: ‘%s’ directive writing up to 4095 bytes into a region of size between 4094 and 8189 [-Wformat-overflow=]
    sprintf(line, " %s=\"%s\"", name_enc, val_enc);
                         ^~               ~~~~~~~
mxml/mxml.c:515:4: note: ‘sprintf’ output between 5 and 8195 bytes into a destination of size 8192
    sprintf(line, " %s=\"%s\"", name_enc, val_enc);
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
mxml/mxml.c: In function ‘mxml_parse_entity’:
mxml/mxml.c:1932:38: warning: ‘sprintf’ may write a terminating nul past the end of the destination [-Wformat-overflow=]
             sprintf(filename, "%s%c%s", directoryname, DIR_SEPARATOR, entity_reference_name[i]);
                                      ^
mxml/mxml.c:1932:13: note: ‘sprintf’ output 2 or more bytes (assuming 4097) into a destination of size 4096
             sprintf(filename, "%s%c%s", directoryname, DIR_SEPARATOR, entity_reference_name[i]);
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
gcc -O3 -funroll-loops -fomit-frame-pointer -W -Wall -Wno-deprecated-declarations -Imxml -DHAVE_SSL -w -c -o crypt.o src/crypt.c
gcc -O3 -funroll-loops -fomit-frame-pointer -W -Wall -Wno-deprecated-declarations -Imxml -DHAVE_SSL -w -c -o regex.o src/regex.c
gcc -O3 -funroll-loops -fomit-frame-pointer -W -Wall -Wno-deprecated-declarations -Imxml -DHAVE_SSL -c -o strlcpy.o mxml/strlcpy.c
gcc -O3 -funroll-loops -fomit-frame-pointer -W -Wall -Wno-deprecated-declarations -Imxml -DHAVE_SSL -o elog src/elog.c mxml.o crypt.o regex.o strlcpy.o -lssl
src/elog.c: In function ‘retrieve_elog’:
src/elog.c:524:13: warning: ‘strncpy’ specified bound 256 equals destination size [-Wstringop-truncation]
             strncpy(str, strstr(response, "Location:") + 10, sizeof(str));
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elog.c: In function ‘submit_elog’:
src/elog.c:982:10: warning: ‘strncpy’ specified bound 80 equals destination size [-Wstringop-truncation]
          strncpy(str, strstr(response, "Error: Attribute") + 20, sizeof(str));
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elog.c:977:10: warning: ‘strncpy’ specified bound 80 equals destination size [-Wstringop-truncation]
          strncpy(str, strstr(response, "Error: Attribute") + 27, sizeof(str));
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elog.c:956:13: warning: ‘strncpy’ specified bound 80 equals destination size [-Wstringop-truncation]
             strncpy(str, strstr(response, "Location:") + 10, sizeof(str));
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
gcc -O3 -funroll-loops -fomit-frame-pointer -W -Wall -Wno-deprecated-declarations -Imxml -DHAVE_SSL -w -c -o auth.o src/auth.c
gcc -O3 -funroll-loops -fomit-frame-pointer -W -Wall -Wno-deprecated-declarations -Imxml -DHAVE_SSL -o elogd src/elogd.c auth.o mxml.o crypt.o regex.o strlcpy.o -lssl
src/elogd.c: In function ‘cleanup’:
src/elogd.c:30641:48: warning: ‘%s’ directive writing up to 255 bytes into a region of size 233 [-Wformat-overflow=]
          sprintf(str, "Cannot remove pidfile \"%s\"\n", pidfile);
                                                ^~       ~~~~~~~
src/elogd.c:30641:10: note: ‘sprintf’ output between 26 and 281 bytes into a destination of size 256
          sprintf(str, "Cannot remove pidfile \"%s\"\n", pidfile);
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c: In function ‘split_url’:
src/elogd.c:2490:4: warning: ‘strncpy’ specified bound 256 equals destination size [-Wstringop-truncation]
    strncpy(str, p, sizeof(str));
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c: In function ‘getcfg’:
src/elogd.c:3091:28: warning: ‘%s’ directive writing up to 255 bytes into a region of size 249 [-Wformat-overflow=]
src/elogd.c:2753:14:
       return _topgroup;
              ~~~~~~~~~      
src/elogd.c:3091:28:
       sprintf(str, "global %s", getcfg_topgroup());
                            ^~
src/elogd.c:3091:7: note: ‘sprintf’ output between 8 and 263 bytes into a destination of size 256
       sprintf(str, "global %s", getcfg_topgroup());
       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c: In function ‘getcfg.constprop’:
src/elogd.c:3091:28: warning: ‘%s’ directive writing up to 255 bytes into a region of size 249 [-Wformat-overflow=]
src/elogd.c:2753:14:
       return _topgroup;
              ~~~~~~~~~      
src/elogd.c:3091:28:
       sprintf(str, "global %s", getcfg_topgroup());
                            ^~
src/elogd.c:3091:7: note: ‘sprintf’ output between 8 and 263 bytes into a destination of size 256
       sprintf(str, "global %s", getcfg_topgroup());
       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c: In function ‘ss_file_find’:
src/elogd.c:3775:10: warning: ‘strncpy’ output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation]
          strncpy(*plist + (i * MAX_PATH_LENGTH), dp->d_name, strlen(dp->d_name));
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c: In function ‘html_allowed’:
src/elogd.c:3091:28: warning: ‘%s’ directive writing up to 255 bytes into a region of size 249 [-Wformat-overflow=]
src/elogd.c:2753:14:
       return _topgroup;
              ~~~~~~~~~      
src/elogd.c:3091:28:
       sprintf(str, "global %s", getcfg_topgroup());
                            ^~
src/elogd.c:3091:7: note: ‘sprintf’ output between 8 and 263 bytes into a destination of size 256
       sprintf(str, "global %s", getcfg_topgroup());
       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c: In function ‘create_thumbnail.part.38’:
src/elogd.c:24226:41: warning: ‘%s’ directive writing up to 511 bytes into a region of size 243 [-Wformat-overflow=]
       sprintf(thumb_size, " -thumbnail '%s'", str);
                                         ^~    ~~~
src/elogd.c:24226:7: note: ‘sprintf’ output between 15 and 526 bytes into a destination of size 256
       sprintf(thumb_size, " -thumbnail '%s'", str);
       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:24253:40: warning: ‘ '’ directive output may be truncated writing 2 bytes into a region of size between 1 and 511 [-Wformat-truncation=]
       snprintf(cmd, sizeof(cmd), "%s %s '%s[0-7]'%s '%s'", _convert_cmd, thumb_options, file_name, thumb_size, str);
                                        ^~
src/elogd.c:24253:7: note: ‘snprintf’ output 13 or more bytes (assuming 1289) into a destination of size 512
       snprintf(cmd, sizeof(cmd), "%s %s '%s[0-7]'%s '%s'", _convert_cmd, thumb_options, file_name, thumb_size, str);
       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:24255:40: warning: ‘ '’ directive output may be truncated writing 2 bytes into a region of size between 1 and 511 [-Wformat-truncation=]
       snprintf(cmd, sizeof(cmd), "%s %s '%s'%s '%s'", _convert_cmd, thumb_options, file_name, thumb_size, str);
                                        ^~
src/elogd.c:24255:7: note: ‘snprintf’ output 8 or more bytes (assuming 1284) into a destination of size 512
       snprintf(cmd, sizeof(cmd), "%s %s '%s'%s '%s'", _convert_cmd, thumb_options, file_name, thumb_size, str);
       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:24263:40: warning: ‘%s’ directive output may be truncated writing up to 511 bytes into a region of size 505 [-Wformat-truncation=]
    snprintf(str, sizeof(str), "SHELL \"%s\"", cmd);
                                        ^~     ~~~
src/elogd.c:24263:4: note: ‘snprintf’ output between 9 and 520 bytes into a destination of size 512
    snprintf(str, sizeof(str), "SHELL \"%s\"", cmd);
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c: In function ‘rsputs_elcode’:
src/elogd.c:6618:71: warning: ‘%s’ directive output may be truncated writing up to 999 bytes into a region of size 993 [-Wformat-truncation=]
                            snprintf(hattrib, sizeof(hattrib), "http://%s", attrib);
                                                                       ^~   ~~~~~~
src/elogd.c:6618:28: note: ‘snprintf’ output between 8 and 1007 bytes into a destination of size 1000
                            snprintf(hattrib, sizeof(hattrib), "http://%s", attrib);
                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:6616:72: warning: ‘%s’ directive output may be truncated writing up to 999 bytes into a region of size 992 [-Wformat-truncation=]
                            snprintf(hattrib, sizeof(hattrib), "https://%s", attrib);
                                                                        ^~   ~~~~~~
src/elogd.c:6616:28: note: ‘snprintf’ output between 9 and 1008 bytes into a destination of size 1000
                            snprintf(hattrib, sizeof(hattrib), "https://%s", attrib);
                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:6568:53: warning: ‘%s’ directive writing up to 999 bytes into a region of size 993 [-Wformat-overflow=]
                            sprintf(hattrib, "http://%s", attrib);
                                                     ^~   ~~~~~~
src/elogd.c:6568:28: note: ‘sprintf’ output between 8 and 1007 bytes into a destination of size 1000
                            sprintf(hattrib, "http://%s", attrib);
                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:6566:54: warning: ‘%s’ directive writing up to 999 bytes into a region of size 992 [-Wformat-overflow=]
                            sprintf(hattrib, "https://%s", attrib);
                                                      ^~   ~~~~~~
src/elogd.c:6566:28: note: ‘sprintf’ output between 9 and 1008 bytes into a destination of size 1000
                            sprintf(hattrib, "https://%s", attrib);
                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c: In function ‘el_submit_attachment’:
src/elogd.c:4696:55: warning: ‘%s’ directive writing up to 255 bytes into a region of size 226 [-Wformat-overflow=]
          sprintf(str, "Cannot write attachment file \"%s\"", file_name);
                                                       ^~     ~~~~~~~~~
src/elogd.c:4696:10: note: ‘sprintf’ output between 32 and 287 bytes into a destination of size 256
          sprintf(str, "Cannot write attachment file \"%s\"", file_name);
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c: In function ‘attrib_from_param’:
src/elogd.c:9364:30: warning: ‘%d’ directive writing between 1 and 3 bytes into a region of size between 0 and 1499 [-Wformat-overflow=]
             sprintf(str, "%s_%d", ua, j);
                              ^~
src/elogd.c:9364:26: note: directive argument in the range [0, 100]
             sprintf(str, "%s_%d", ua, j);
                          ^~~~~~~
src/elogd.c:9364:13: note: ‘sprintf’ output between 3 and 1504 bytes into a destination of size 1500
             sprintf(str, "%s_%d", ua, j);
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c: In function ‘el_retrieve’:
src/elogd.c:4503:46: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size between 1 and 256 [-Wformat-truncation=]
    snprintf(file_name, sizeof(file_name), "%s%s%s", lbs->data_dir, lbs->el_index[index].subdir, lbs->el_index[index].file_name);
                                              ^~
src/elogd.c:4503:4: note: ‘snprintf’ output between 1 and 542 bytes into a destination of size 256
    snprintf(file_name, sizeof(file_name), "%s%s%s", lbs->data_dir, lbs->el_index[index].subdir, lbs->el_index[index].file_name);
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c: In function ‘el_retrieve_attachment.part.32’:
src/elogd.c:4764:46: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size between 1 and 256 [-Wformat-truncation=]
    snprintf(file_name, sizeof(file_name), "%s%s%s", lbs->data_dir, lbs->el_index[index].subdir, lbs->el_index[index].file_name);
                                              ^~
src/elogd.c:4764:4: note: ‘snprintf’ output between 1 and 542 bytes into a destination of size 256
    snprintf(file_name, sizeof(file_name), "%s%s%s", lbs->data_dir, lbs->el_index[index].subdir, lbs->el_index[index].file_name);
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c: In function ‘el_submit’:
src/elogd.c:4894:49: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size between 1 and 256 [-Wformat-truncation=]
       snprintf(file_name, sizeof(file_name), "%s%s%s", lbs->data_dir, lbs->el_index[index].subdir, lbs->el_index[index].file_name);
                                                 ^~
src/elogd.c:4894:7: note: ‘snprintf’ output between 1 and 542 bytes into a destination of size 256
       snprintf(file_name, sizeof(file_name), "%s%s%s", lbs->data_dir, lbs->el_index[index].subdir, lbs->el_index[index].file_name);
       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c: In function ‘el_retrieve.constprop’:
src/elogd.c:4503:46: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size between 1 and 256 [-Wformat-truncation=]
    snprintf(file_name, sizeof(file_name), "%s%s%s", lbs->data_dir, lbs->el_index[index].subdir, lbs->el_index[index].file_name);
                                              ^~
src/elogd.c:4503:4: note: ‘snprintf’ output between 1 and 542 bytes into a destination of size 256
    snprintf(file_name, sizeof(file_name), "%s%s%s", lbs->data_dir, lbs->el_index[index].subdir, lbs->el_index[index].file_name);
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c: In function ‘el_retrieve.constprop’:
src/elogd.c:4503:46: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size between 1 and 256 [-Wformat-truncation=]
    snprintf(file_name, sizeof(file_name), "%s%s%s", lbs->data_dir, lbs->el_index[index].subdir, lbs->el_index[index].file_name);
                                              ^~
src/elogd.c:4503:4: note: ‘snprintf’ output between 1 and 542 bytes into a destination of size 256
    snprintf(file_name, sizeof(file_name), "%s%s%s", lbs->data_dir, lbs->el_index[index].subdir, lbs->el_index[index].file_name);
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c: In function ‘show_download_page’:
src/elogd.c:14786:52: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size between 1 and 256 [-Wformat-truncation=]
          snprintf(file_name, sizeof(file_name), "%s%s%s", lbs->data_dir, lbs->el_index[index].subdir, lbs->el_index[index].file_name);
                                                    ^~
src/elogd.c:14786:10: note: ‘snprintf’ output between 1 and 542 bytes into a destination of size 256
          snprintf(file_name, sizeof(file_name), "%s%s%s", lbs->data_dir, lbs->el_index[index].subdir, lbs->el_index[index].file_name);
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c: In function ‘show_page_filters’:
src/elogd.c:19317:45: warning: ‘$’ directive writing 1 byte into a region of size between 0 and 1499 [-Wformat-overflow=]
                   sprintf(option_whole, "^%s$", option);
                                             ^
src/elogd.c:19317:19: note: ‘sprintf’ output between 3 and 1502 bytes into a destination of size 1500
                   sprintf(option_whole, "^%s$", option);
                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c: In function ‘is_inline_attachment’:
src/elogd.c:24205:31: warning: ‘%s’ directive writing up to 255 bytes into a region of size between 237 and 247 [-Wformat-overflow=]
       sprintf(str, "cid:att%d@%s", i, domain);
                               ^~      ~~~~~~
src/elogd.c:24205:7: note: ‘sprintf’ output between 10 and 275 bytes into a destination of size 256
       sprintf(str, "cid:att%d@%s", i, domain);
       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c: In function ‘load_password_file’:
src/elogd.c:25739:58: warning: ‘%s’ directive writing up to 255 bytes into a region of size 226 [-Wformat-overflow=]
             sprintf(str, "Cannot convert password file \"%s\"", file_name);
                                                          ^~     ~~~~~~~~~
src/elogd.c:25739:13: note: ‘sprintf’ output between 32 and 287 bytes into a destination of size 256
             sprintf(str, "Cannot convert password file \"%s\"", file_name);
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:25728:70: warning: ‘%s’ directive writing up to 255 bytes into a region of size 211 [-Wformat-overflow=]
          sprintf(str, "Cannot access write protected password file \"%s\"", file_name);
                                                                      ^~     ~~~~~~~~~
src/elogd.c:25728:10: note: ‘sprintf’ output between 47 and 302 bytes into a destination of size 256
          sprintf(str, "Cannot access write protected password file \"%s\"", file_name);
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:25719:54: warning: ‘%s’ directive writing up to 255 bytes into a region of size 227 [-Wformat-overflow=]
          sprintf(str, "Cannot access password file \"%s\"", file_name);
                                                      ^~     ~~~~~~~~~
src/elogd.c:25719:10: note: ‘sprintf’ output between 31 and 286 bytes into a destination of size 256
          sprintf(str, "Cannot access password file \"%s\"", file_name);
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:25699:43: warning: ‘%s’ directive writing up to 255 bytes into a region of size 238 [-Wformat-overflow=]
          sprintf(str, "Cannot open file \"%s\"", file_name);
                                           ^~     ~~~~~~~~~
src/elogd.c:25699:10: note: ‘sprintf’ output between 20 and 275 bytes into a destination of size 256
          sprintf(str, "Cannot open file \"%s\"", file_name);
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c: In function ‘rename_logbook’:
src/elogd.c:13118:27: warning: ‘%s’ directive writing up to 255 bytes into a region of size between 1 and 256 [-Wformat-overflow=]
       sprintf(old_dir, "%s%s", lb_dir, lbs->name);
                           ^~
src/elogd.c:13118:7: note: ‘sprintf’ output between 1 and 511 bytes into a destination of size 256
       sprintf(old_dir, "%s%s", lb_dir, lbs->name);
       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c: In function ‘execute_shell.part.42’:
src/elogd.c:22772:26: warning: ‘%s’ directive writing up to 9999 bytes into a region of size 1493 [-Wformat-overflow=]
    sprintf(str, "SHELL \"%s\"", shell_cmd);
                          ^~     ~~~~~~~~~
src/elogd.c:22772:4: note: ‘sprintf’ output between 9 and 10008 bytes into a destination of size 1500
    sprintf(str, "SHELL \"%s\"", shell_cmd);
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c: In function ‘el_delete_message’:
src/elogd.c:5242:46: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size between 1 and 256 [-Wformat-truncation=]
    snprintf(file_name, sizeof(file_name), "%s%s%s", lbs->data_dir, lbs->el_index[index].subdir, lbs->el_index[index].file_name);
                                              ^~
src/elogd.c:5242:4: note: ‘snprintf’ output between 1 and 542 bytes into a destination of size 256
    snprintf(file_name, sizeof(file_name), "%s%s%s", lbs->data_dir, lbs->el_index[index].subdir, lbs->el_index[index].file_name);
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c: In function ‘copy_to’:
src/elogd.c:24081:28: warning: ‘%s’ directive writing up to 255 bytes into a region of size 252 [-Wformat-overflow=]
          sprintf(str, "?lb=%s\"", lbs->name_enc);
                            ^~
src/elogd.c:24081:10: note: ‘sprintf’ output between 6 and 261 bytes into a destination of size 256
          sprintf(str, "?lb=%s\"", lbs->name_enc);
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:24085:28: warning: ‘%s’ directive writing up to 255 bytes into a region of size 252 [-Wformat-overflow=]
          sprintf(str, "?lb=%s&", lbs->name_enc);
                            ^~
src/elogd.c:24085:10: note: ‘sprintf’ output between 6 and 261 bytes into a destination of size 256
          sprintf(str, "?lb=%s&", lbs->name_enc);
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:24085:28: warning: ‘%s’ directive writing up to 255 bytes into a region of size 252 [-Wformat-overflow=]
          sprintf(str, "?lb=%s&", lbs->name_enc);
                            ^~
src/elogd.c:24085:10: note: ‘sprintf’ output between 6 and 261 bytes into a destination of size 256
          sprintf(str, "?lb=%s&", lbs->name_enc);
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c: In function ‘show_logbook_new’:
src/elogd.c:14689:24: warning: ‘%s’ directive writing up to 255 bytes into a region of size 253 [-Wformat-overflow=]
       sprintf(str, "../%s/?cmd=Config", lbn);
                        ^~               ~~~
src/elogd.c:14689:7: note: ‘sprintf’ output between 16 and 271 bytes into a destination of size 256
       sprintf(str, "../%s/?cmd=Config", lbn);
       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c: In function ‘display_line’:
src/elogd.c:17743:37: warning: ‘%s’ directive writing up to 1499 bytes into a region of size between 1412 and 1491 [-Wformat-overflow=]
          sprintf(str, "%s\" style=\"%s", rowstyle, display);
                                     ^~             ~~~~~~~
src/elogd.c:17743:10: note: ‘sprintf’ output between 10 and 1588 bytes into a destination of size 1500
          sprintf(str, "%s\" style=\"%s", rowstyle, display);
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:17841:33: warning: ‘%s’ directive writing up to 255 bytes into a region of size 253 [-Wformat-overflow=]
                sprintf(ref, "../%s/%s/%s", lbs->name, str, attachment[i] + 14);
                                 ^~
src/elogd.c:17841:16: note: ‘sprintf’ output 6 or more bytes (assuming 1760) into a destination of size 256
                sprintf(ref, "../%s/%s/%s", lbs->name, str, attachment[i] + 14);
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:17976:46: warning: ‘%s’ directive writing up to 1499 bytes into a region of size between 1412 and 1491 [-Wformat-overflow=]
                   sprintf(str, "%s\" style=\"%s", rowstyle, display);
                                              ^~             ~~~~~~~
src/elogd.c:17976:19: note: ‘sprintf’ output between 10 and 1588 bytes into a destination of size 1500
                   sprintf(str, "%s\" style=\"%s", rowstyle, display);
                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:18201:36: warning: ‘%s’ directive writing up to 255 bytes into a region of size 253 [-Wformat-overflow=]
                   sprintf(ref, "../%s/%s/%s", lbs->name, str, attachment[i] + 14);
                                    ^~
src/elogd.c:18201:19: note: ‘sprintf’ output 6 or more bytes (assuming 1760) into a destination of size 256
                   sprintf(ref, "../%s/%s/%s", lbs->name, str, attachment[i] + 14);
                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:18323:33: warning: ‘%s’ directive writing up to 255 bytes into a region of size 253 [-Wformat-overflow=]
                sprintf(ref, "../%s/%s/%s", lbs->name, str, attachment[i] + 14);
                                 ^~
src/elogd.c:18323:16: note: ‘sprintf’ output 6 or more bytes (assuming 1760) into a destination of size 256
                sprintf(ref, "../%s/%s/%s", lbs->name, str, attachment[i] + 14);
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:18381:30: warning: ‘%s’ directive writing up to 255 bytes into a region of size 253 [-Wformat-overflow=]
             sprintf(ref, "../%s/%s/%s", lbs->name, str, attachment[index] + 14);
                              ^~
src/elogd.c:18381:13: note: ‘sprintf’ output 6 or more bytes (assuming 1760) into a destination of size 256
             sprintf(ref, "../%s/%s/%s", lbs->name, str, attachment[index] + 14);
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c: In function ‘show_rss_feed’:
src/elogd.c:19817:31: warning: ‘%s’ directive writing up to 255 bytes into a region of size 249 [-Wformat-overflow=]
          sprintf(url, "http://%s", host_name);
                               ^~   ~~~~~~~~~
src/elogd.c:19817:10: note: ‘sprintf’ output between 8 and 263 bytes into a destination of size 256
          sprintf(url, "http://%s", host_name);
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:19815:32: warning: ‘%s’ directive writing up to 255 bytes into a region of size 248 [-Wformat-overflow=]
          sprintf(url, "https://%s", host_name);
                                ^~   ~~~~~~~~~
src/elogd.c:19815:10: note: ‘sprintf’ output between 9 and 264 bytes into a destination of size 256
          sprintf(url, "https://%s", host_name);
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:19902:41: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size 79 [-Wformat-truncation=]
       snprintf(date, sizeof(date) - 1, "%s %+03d%02d", str, (int) (offset / 3600), (int) ((abs((int) offset)
                                         ^~             ~~~
src/elogd.c:19902:40: note: directive argument in the range [-596523, 596523]
       snprintf(date, sizeof(date) - 1, "%s %+03d%02d", str, (int) (offset / 3600), (int) ((abs((int) offset)
                                        ^~~~~~~~~~~~~~
src/elogd.c:19902:40: note: directive argument in the range [0, 59]
src/elogd.c:19902:7: note: ‘snprintf’ output between 7 and 266 bytes into a destination of size 79
       snprintf(date, sizeof(date) - 1, "%s %+03d%02d", str, (int) (offset / 3600), (int) ((abs((int) offset)
       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                                                                                            / 60) % 60));
                                                                                            ~~~~~~~~~~~~
src/elogd.c: In function ‘show_find_form’:
src/elogd.c:12538:40: warning: ‘$’ directive writing 1 byte into a region of size between 0 and 1499 [-Wformat-overflow=]
                sprintf(whole_attr, "^%s$", str);
                                        ^
src/elogd.c:12538:16: note: ‘sprintf’ output between 3 and 1502 bytes into a destination of size 1500
                sprintf(whole_attr, "^%s$", str);
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:12496:43: warning: ‘%s’ directive writing up to 1499 bytes into a region of size 1487 [-Wformat-overflow=]
                sprintf(str, "Icon comment %s", option);
                                           ^~   ~~~~~~
src/elogd.c:12496:16: note: ‘sprintf’ output between 14 and 1513 bytes into a destination of size 1500
                sprintf(str, "Icon comment %s", option);
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c: In function ‘submit_message’:
src/elogd.c:16089:7: warning: ‘strncpy’ specified bound 256 equals destination size [-Wstringop-truncation]
       strncpy(str, strstr(response, "Error: Attribute") + 20, sizeof(str));
       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c: In function ‘submit_config’:
src/elogd.c:16368:7: warning: ‘strncpy’ specified bound 256 equals destination size [-Wstringop-truncation]
       strncpy(str, strstr(response, "Error: Attribute") + 20, sizeof(str));
       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c: In function ‘synchronize_logbook’:
src/elogd.c:16859:45: warning: ‘%s’ directive writing up to 255 bytes into a region of size 244 [-Wformat-overflow=]
             sprintf(loc_ref, "<a href=\".\">%s</a>", lbs->name);
                                             ^~
src/elogd.c:16859:13: note: ‘sprintf’ output between 17 and 272 bytes into a destination of size 256
             sprintf(loc_ref, "<a href=\".\">%s</a>", lbs->name);
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:16857:41: warning: ‘%s’ directive writing up to 255 bytes into a region of size 247 [-Wformat-overflow=]
             sprintf(loc_ref, "<a href=\"%s/\">%s</a>", lbs->name_enc, lbs->name);
                                         ^~
src/elogd.c:16857:13: note: ‘sprintf’ output between 17 and 527 bytes into a destination of size 256
             sprintf(loc_ref, "<a href=\"%s/\">%s</a>", lbs->name_enc, lbs->name);
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:16855:44: warning: ‘%s’ directive writing up to 255 bytes into a region of size 244 [-Wformat-overflow=]
             sprintf(loc_ref, "<a href=\"../%s/\">%s</a>", lbs->name_enc, lbs->name);
                                            ^~
src/elogd.c:16855:13: note: ‘sprintf’ output between 20 and 530 bytes into a destination of size 256
             sprintf(loc_ref, "<a href=\"../%s/\">%s</a>", lbs->name_enc, lbs->name);
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:17181:50: warning: ‘%s’ directive writing up to 255 bytes into a region of size 247 [-Wformat-overflow=]
                      sprintf(loc_ref, "<a href=\"%s/%d\">%s</a>", lbs->name_enc, message_id, loc("local"));
                                                  ^~
src/elogd.c:17181:22: note: ‘sprintf’ output 18 or more bytes (assuming 273) into a destination of size 256
                      sprintf(loc_ref, "<a href=\"%s/%d\">%s</a>", lbs->name_enc, message_id, loc("local"));
                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:17179:53: warning: ‘%s’ directive writing up to 255 bytes into a region of size 244 [-Wformat-overflow=]
                      sprintf(loc_ref, "<a href=\"../%s/%d\">%s</a>", lbs->name_enc, message_id, loc("local"));
                                                     ^~
src/elogd.c:17179:22: note: ‘sprintf’ output 21 or more bytes (assuming 276) into a destination of size 256
                      sprintf(loc_ref, "<a href=\"../%s/%d\">%s</a>", lbs->name_enc, message_id, loc("local"));
                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:17185:54: warning: ‘%s’ directive writing up to 1999 bytes into a region of size 240 [-Wformat-overflow=]
                   sprintf(rem_ref, "<a href=\"http://%s%d\">%s</a>", str, message_id, loc("remote"));
                                                      ^~              ~~~
src/elogd.c:17185:19: note: ‘sprintf’ output 24 or more bytes (assuming 2023) into a destination of size 256
                   sprintf(rem_ref, "<a href=\"http://%s%d\">%s</a>", str, message_id, loc("remote"));
                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:17256:50: warning: ‘%s’ directive writing up to 255 bytes into a region of size 247 [-Wformat-overflow=]
                      sprintf(loc_ref, "<a href=\"%s/%d\">%s</a>", lbs->name_enc, message_id,
                                                  ^~
src/elogd.c:17256:22: note: ‘sprintf’ output 18 or more bytes (assuming 273) into a destination of size 256
                      sprintf(loc_ref, "<a href=\"%s/%d\">%s</a>", lbs->name_enc, message_id,
                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                              loc("Local entry"));
                              ~~~~~~~~~~~~~~~~~~~
src/elogd.c:17254:53: warning: ‘%s’ directive writing up to 255 bytes into a region of size 244 [-Wformat-overflow=]
                      sprintf(loc_ref, "<a href=\"../%s/%d\">%s</a>", lbs->name_enc, message_id, loc("local"));
                                                     ^~
src/elogd.c:17254:22: note: ‘sprintf’ output 21 or more bytes (assuming 276) into a destination of size 256
                      sprintf(loc_ref, "<a href=\"../%s/%d\">%s</a>", lbs->name_enc, message_id, loc("local"));
                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:16825:33: warning: ‘%s’ directive writing up to 1999 bytes into a region of size 992 [-Wformat-overflow=]
          sprintf(line, "MIRROR: %s", str);
                                 ^~
src/elogd.c:17044:31:
             mprint(lbs, mode, str);
                               ~~~
src/elogd.c:16825:10: note: ‘sprintf’ output between 9 and 2008 bytes into a destination of size 1000
          sprintf(line, "MIRROR: %s", str);
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:17501:60: warning: ‘%s’ directive writing up to 1999 bytes into a region of size 240 [-Wformat-overflow=]
                         sprintf(rem_ref, "<a href=\"http://%s%d\">%s</a>", str, message_id,
                                                            ^~              ~~~
src/elogd.c:17501:25: note: ‘sprintf’ output 24 or more bytes (assuming 2023) into a destination of size 256
                         sprintf(rem_ref, "<a href=\"http://%s%d\">%s</a>", str, message_id,
                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                                 loc("Remote entry"));
                                 ~~~~~~~~~~~~~~~~~~~~
src/elogd.c: In function ‘retrieve_email_from’:
src/elogd.c:3539:44: warning: ‘%s’ directive writing up to 255 bytes into a region of size 245 [-Wformat-overflow=]
       sprintf(email_from_name, "ELog <ELog@%s>", host_name);
                                            ^~    ~~~~~~~~~
src/elogd.c:3539:7: note: ‘sprintf’ output between 13 and 268 bytes into a destination of size 256
       sprintf(email_from_name, "ELog <ELog@%s>", host_name);
       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:3540:34: warning: ‘%s’ directive writing up to 255 bytes into a region of size 250 [-Wformat-overflow=]
       sprintf(email_from, "<ELog@%s>", host_name);
                                  ^~    ~~~~~~~~~
src/elogd.c:3540:7: note: ‘sprintf’ output between 8 and 263 bytes into a destination of size 256
       sprintf(email_from, "<ELog@%s>", host_name);
       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:25877:41: warning: ‘%s’ directive writing up to 255 bytes into a region of size 239 [-Wformat-overflow=]
src/elogd.c:3560:53:
          get_user_line(lbs, login_name, NULL, NULL, email_from, NULL, NULL, NULL);
                                                     ~~~~~~~~~~
src/elogd.c:25877:41:
          sprintf(str, "/list/user[email=%s]", email);
                                         ^~
src/elogd.c:25877:10: note: ‘sprintf’ output between 19 and 274 bytes into a destination of size 256
          sprintf(str, "/list/user[email=%s]", email);
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:25873:40: warning: ‘%s’ directive writing up to 255 bytes into a region of size 240 [-Wformat-overflow=]
src/elogd.c:3560:29:
          get_user_line(lbs, login_name, NULL, NULL, email_from, NULL, NULL, NULL);
                             ~~~~~~~~~~  
src/elogd.c:25873:40:
          sprintf(str, "/list/user[name=%s]", user);
                                        ^~
src/elogd.c:25873:10: note: ‘sprintf’ output between 18 and 273 bytes into a destination of size 256
          sprintf(str, "/list/user[name=%s]", user);
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:3561:38: warning: ‘ <’ directive writing 2 bytes into a region of size between 1 and 256 [-Wformat-overflow=]
          sprintf(email_from_name, "%s <%s>", login_name, email_from);
                                      ^~
src/elogd.c:3561:10: note: ‘sprintf’ output between 4 and 514 bytes into a destination of size 256
          sprintf(email_from_name, "%s <%s>", login_name, email_from);
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c: In function ‘save_user_config’:
src/elogd.c:13400:29: warning: ‘%s’ directive writing up to 255 bytes into a region of size 254 [-Wformat-overflow=]
          sprintf(str, "%s \"%s\" %s", loc("Login name"), user_enc, loc("exists already"));
                             ^~                           ~~~~~~~~
src/elogd.c:13400:10: note: ‘sprintf’ output 5 or more bytes (assuming 260) into a destination of size 256
          sprintf(str, "%s \"%s\" %s", loc("Login name"), user_enc, loc("exists already"));
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:13425:34: warning: ‘%s’ directive writing up to 255 bytes into a region of size 240 [-Wformat-overflow=]
    sprintf(str, "/list/user[name=%s]", user_enc);
                                  ^~    ~~~~~~~~
src/elogd.c:13425:4: note: ‘sprintf’ output between 18 and 273 bytes into a destination of size 256
    sprintf(str, "/list/user[name=%s]", user_enc);
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:13519:40: warning: ‘%s’ directive writing up to 255 bytes into a region of size 249 [-Wformat-overflow=]
                   sprintf(url, "http://%s:%d/", http_host, elog_tcp_port);
                                        ^~       ~~~~~~~~~
src/elogd.c:13519:19: note: ‘sprintf’ output between 11 and 276 bytes into a destination of size 256
                   sprintf(url, "http://%s:%d/", http_host, elog_tcp_port);
                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:13517:41: warning: ‘%s’ directive writing up to 255 bytes into a region of size 248 [-Wformat-overflow=]
                   sprintf(url, "https://%s:%d/", http_host, elog_tcp_port);
                                         ^~       ~~~~~~~~~
src/elogd.c:13517:19: note: ‘sprintf’ output between 12 and 277 bytes into a destination of size 256
                   sprintf(url, "https://%s:%d/", http_host, elog_tcp_port);
                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:13514:40: warning: ‘%s’ directive writing up to 255 bytes into a region of size 249 [-Wformat-overflow=]
                   sprintf(url, "http://%s/", http_host);
                                        ^~    ~~~~~~~~~
src/elogd.c:13514:19: note: ‘sprintf’ output between 9 and 264 bytes into a destination of size 256
                   sprintf(url, "http://%s/", http_host);
                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:13512:41: warning: ‘%s’ directive writing up to 255 bytes into a region of size 248 [-Wformat-overflow=]
                   sprintf(url, "https://%s/", http_host);
                                         ^~    ~~~~~~~~~
src/elogd.c:13512:19: note: ‘sprintf’ output between 10 and 265 bytes into a destination of size 256
                   sprintf(url, "https://%s/", http_host);
                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:13705:30: warning: ‘%s’ directive writing up to 255 bytes into a region of size 253 [-Wformat-overflow=]
             sprintf(str, "../%s/", lbs->name_enc);
                              ^~
src/elogd.c:13705:13: note: ‘sprintf’ output between 5 and 260 bytes into a destination of size 256
             sprintf(str, "../%s/", lbs->name_enc);
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c: In function ‘activate_user’:
src/elogd.c:25877:41: warning: ‘%s’ directive writing up to 255 bytes into a region of size 239 [-Wformat-overflow=]
src/elogd.c:14075:46:
    get_user_line(lbs, user_name, NULL, NULL, user_email, NULL, NULL, &inactive);
                                              ~~~~~~~~~~
src/elogd.c:25877:41:
          sprintf(str, "/list/user[email=%s]", email);
                                         ^~
src/elogd.c:25877:10: note: ‘sprintf’ output between 19 and 274 bytes into a destination of size 256
          sprintf(str, "/list/user[email=%s]", email);
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:14111:40: warning: ‘%s’ directive writing up to 255 bytes into a region of size 249 [-Wformat-overflow=]
                   sprintf(url, "http://%s:%d/", http_host, elog_tcp_port);
                                        ^~       ~~~~~~~~~
src/elogd.c:14111:19: note: ‘sprintf’ output between 11 and 276 bytes into a destination of size 256
                   sprintf(url, "http://%s:%d/", http_host, elog_tcp_port);
                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:14109:41: warning: ‘%s’ directive writing up to 255 bytes into a region of size 248 [-Wformat-overflow=]
                   sprintf(url, "https://%s:%d/", http_host, elog_tcp_port);
                                         ^~       ~~~~~~~~~
src/elogd.c:14109:19: note: ‘sprintf’ output between 12 and 277 bytes into a destination of size 256
                   sprintf(url, "https://%s:%d/", http_host, elog_tcp_port);
                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:14106:40: warning: ‘%s’ directive writing up to 255 bytes into a region of size 249 [-Wformat-overflow=]
                   sprintf(url, "http://%s/", http_host);
                                        ^~    ~~~~~~~~~
src/elogd.c:14106:19: note: ‘sprintf’ output between 9 and 264 bytes into a destination of size 256
                   sprintf(url, "http://%s/", http_host);
                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:14104:41: warning: ‘%s’ directive writing up to 255 bytes into a region of size 248 [-Wformat-overflow=]
                   sprintf(url, "https://%s/", http_host);
                                         ^~    ~~~~~~~~~
src/elogd.c:14104:19: note: ‘sprintf’ output between 10 and 265 bytes into a destination of size 256
                   sprintf(url, "https://%s/", http_host);
                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c: In function ‘show_forgot_pwd_page’:
src/elogd.c:25877:41: warning: ‘%s’ directive writing up to 255 bytes into a region of size 239 [-Wformat-overflow=]
src/elogd.c:14173:58:
          get_user_line(lbs, login_name, NULL, full_name, user_email, NULL, NULL, NULL);
                                                          ~~~~~~~~~~
src/elogd.c:25877:41:
          sprintf(str, "/list/user[email=%s]", email);
                                         ^~
src/elogd.c:25877:10: note: ‘sprintf’ output between 19 and 274 bytes into a destination of size 256
          sprintf(str, "/list/user[email=%s]", email);
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:25873:40: warning: ‘%s’ directive writing up to 255 bytes into a region of size 240 [-Wformat-overflow=]
src/elogd.c:14173:29:
          get_user_line(lbs, login_name, NULL, full_name, user_email, NULL, NULL, NULL);
                             ~~~~~~~~~~  
src/elogd.c:25873:40:
          sprintf(str, "/list/user[name=%s]", user);
                                        ^~
src/elogd.c:25873:10: note: ‘sprintf’ output between 18 and 273 bytes into a destination of size 256
          sprintf(str, "/list/user[name=%s]", user);
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:14221:44: warning: ‘%s’ directive writing up to 255 bytes into a region of size 243 [-Wformat-overflow=]
             sprintf(redir, "?cmd=%s&oldpwd=%s", loc("Change password"), pwd);
                                            ^~                           ~~~
src/elogd.c:14221:13: note: ‘sprintf’ output 14 or more bytes (assuming 269) into a destination of size 256
             sprintf(redir, "?cmd=%s&oldpwd=%s", loc("Change password"), pwd);
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:14225:34: warning: ‘%s’ directive writing up to 999 bytes into a region of size 993 [-Wformat-overflow=]
             sprintf(str, "?redir=%s&uname=%s&upassword=%s", str2, login_name, pwd);
                                  ^~                         ~~~~
src/elogd.c:14225:13: note: ‘sprintf’ output between 26 and 1535 bytes into a destination of size 1000
             sprintf(str, "?redir=%s&uname=%s&upassword=%s", str2, login_name, pwd);
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c: In function ‘show_change_pwd_page’:
src/elogd.c:9011:53: warning: ‘%s’ directive writing up to 255 bytes into a region of size 237 [-Wformat-overflow=]
                sprintf(str, "?cmd=%s&config=%s&fail=%s", loc("Change password"), getparam("unm"), error_str);
                                                     ^~                                            ~~~~~~~~~
src/elogd.c:9011:16: note: ‘sprintf’ output 20 or more bytes (assuming 275) into a destination of size 256
                sprintf(str, "?cmd=%s&config=%s&fail=%s", loc("Change password"), getparam("unm"), error_str);
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:9001:47: warning: ‘%s’ directive writing up to 255 bytes into a region of size 241 [-Wformat-overflow=]
                sprintf(str, "?cmd=%s&cfg_user=%s", loc("Config"), config);
                                               ^~                  ~~~~~~
src/elogd.c:9001:16: note: ‘sprintf’ output 16 or more bytes (assuming 271) into a destination of size 256
                sprintf(str, "?cmd=%s&cfg_user=%s", loc("Config"), config);
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c: In function ‘show_edit_form’:
src/elogd.c:10047:33: warning: ‘%s’ directive writing up to 255 bytes into a region of size 251 [-Wformat-overflow=]
       sprintf(page_title, "ELOG %s", lbs->name);
                                 ^~
src/elogd.c:10047:7: note: ‘sprintf’ output between 6 and 261 bytes into a destination of size 256
       sprintf(page_title, "ELOG %s", lbs->name);
       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:10721:35: warning: ‘%s’ directive writing up to 9999 bytes into a region of size 248 [-Wformat-overflow=]
          sprintf(title, " title=\"%s\"", comment);
                                   ^~     ~~~~~~~
src/elogd.c:10721:10: note: ‘sprintf’ output between 10 and 10009 bytes into a destination of size 256
          sprintf(title, " title=\"%s\"", comment);
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:11189:52: warning: ‘%s’ directive writing up to 9999 bytes into a region of size 9992 [-Wformat-overflow=]
                         sprintf(tooltip, " title=\"%s\"", comment);
                                                    ^~     ~~~~~~~
src/elogd.c:11189:25: note: ‘sprintf’ output between 10 and 10009 bytes into a destination of size 10000
                         sprintf(tooltip, " title=\"%s\"", comment);
                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:11138:52: warning: ‘%s’ directive writing up to 9999 bytes into a region of size 9992 [-Wformat-overflow=]
                         sprintf(tooltip, " title=\"%s\"", comment);
                                                    ^~     ~~~~~~~
src/elogd.c:11138:25: note: ‘sprintf’ output between 10 and 10009 bytes into a destination of size 10000
                         sprintf(tooltip, " title=\"%s\"", comment);
                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:11143:52: warning: ‘%s’ directive writing up to 9999 bytes into a region of size 9992 [-Wformat-overflow=]
                         sprintf(tooltip, " title=\"%s\"", comment);
                                                    ^~     ~~~~~~~
src/elogd.c:11143:25: note: ‘sprintf’ output between 10 and 10009 bytes into a destination of size 10000
                         sprintf(tooltip, " title=\"%s\"", comment);
                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:11958:41: warning: ‘ -format '’ directive writing 10 bytes into a region of size between 1 and 256 [-Wformat-overflow=]
                         sprintf(cmd, "%s -format '%%wx%%h' '%s'", _identify_cmd, file_name);
                                         ^~~~~~~~~~
src/elogd.c:11958:25: note: ‘sprintf’ output between 20 and 530 bytes into a destination of size 256
                         sprintf(cmd, "%s -format '%%wx%%h' '%s'", _identify_cmd, file_name);
                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:11956:41: warning: ‘ -format '’ directive writing 10 bytes into a region of size between 1 and 256 [-Wformat-overflow=]
                         sprintf(cmd, "%s -format '%%wx%%h' '%s[0]'", _identify_cmd, file_name);
                                         ^~~~~~~~~~
src/elogd.c:11956:25: note: ‘sprintf’ output between 23 and 533 bytes into a destination of size 256
                         sprintf(cmd, "%s -format '%%wx%%h' '%s[0]'", _identify_cmd, file_name);
                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:12022:42: warning: ‘%s’ directive writing up to 2999 bytes into a region of size 256 [-Wformat-overflow=]
                            sprintf(ref, "%s/%s", str, file_enc);
                                          ^~      ~~~
src/elogd.c:12022:28: note: ‘sprintf’ output between 2 and 3256 bytes into a destination of size 256
                            sprintf(ref, "%s/%s", str, file_enc);
                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:12008:48: warning: ‘%s’ directive writing up to 2999 bytes into a region of size 256 [-Wformat-overflow=]
                                  sprintf(ref, "%s/%s?thumb=1", str, file_enc);
                                                ^~              ~~~
src/elogd.c:12008:34: note: ‘sprintf’ output between 10 and 3264 bytes into a destination of size 256
                                  sprintf(ref, "%s/%s?thumb=1", str, file_enc);
                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:11991:42: warning: ‘%s’ directive writing up to 2999 bytes into a region of size 256 [-Wformat-overflow=]
                            sprintf(ref, "%s/%s?thumb=1", str, file_enc);
                                          ^~              ~~~
src/elogd.c:11991:28: note: ‘sprintf’ output between 10 and 3264 bytes into a destination of size 256
                            sprintf(ref, "%s/%s?thumb=1", str, file_enc);
                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c: In function ‘show_elog_list’:
src/elogd.c:20242:39: warning: ‘%s’ directive writing up to 79 bytes into a region of size 73 [-Wformat-overflow=]
          sprintf(mode_cookie, "elmode=%s", mode);
                                       ^~   ~~~~
src/elogd.c:20242:10: note: ‘sprintf’ output between 8 and 87 bytes into a destination of size 80
          sprintf(mode_cookie, "elmode=%s", mode);
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:21574:43: warning: ‘%s’ directive writing up to 1499 bytes into a region of size 249 [-Wformat-overflow=]
                      sprintf(ref, "?rsort=%s", str);
                                           ^~   ~~~
src/elogd.c:21574:22: note: ‘sprintf’ output between 8 and 1507 bytes into a destination of size 256
                      sprintf(ref, "?rsort=%s", str);
                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:21576:42: warning: ‘%s’ directive writing up to 1499 bytes into a region of size 250 [-Wformat-overflow=]
                      sprintf(ref, "?sort=%s", str);
                                          ^~   ~~~
src/elogd.c:21576:22: note: ‘sprintf’ output between 7 and 1506 bytes into a destination of size 256
                      sprintf(ref, "?sort=%s", str);
                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:21592:38: warning: ‘%s’ directive writing up to 1499 bytes into a region of size 1493 [-Wformat-overflow=]
                sprintf(str, "title=\"%s\"", comment);
                                      ^~     ~~~~~~~
src/elogd.c:21592:16: note: ‘sprintf’ output between 9 and 1508 bytes into a destination of size 1500
                sprintf(str, "title=\"%s\"", comment);
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:20066:31: warning: ‘3D’ directive writing 2 bytes into a region of size between 0 and 1499 [-Wformat-overflow=]
             sprintf(str, "%s%%3D", param);
                               ^~
src/elogd.c:20066:13: note: ‘sprintf’ output between 4 and 1503 bytes into a destination of size 1500
             sprintf(str, "%s%%3D", param);
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:20089:31: warning: ‘3D’ directive writing 2 bytes into a region of size between 0 and 1499 [-Wformat-overflow=]
             sprintf(str, "%s%%3D", param);
                               ^~
src/elogd.c:20089:13: note: ‘sprintf’ output between 4 and 1503 bytes into a destination of size 1500
             sprintf(str, "%s%%3D", param);
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c: In function ‘show_elog_entry’:
src/elogd.c:25284:33: warning: ‘%s’ directive writing up to 2999 bytes into a region of size 256 [-Wformat-overflow=]
                   sprintf(ref, "%s/%s", str, file_enc);
                                 ^~      ~~~
src/elogd.c:25284:19: note: ‘sprintf’ output between 2 and 3256 bytes into a destination of size 256
                   sprintf(ref, "%s/%s", str, file_enc);
                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:25278:43: warning: ‘%s’ directive writing up to 255 bytes into a region of size between 246 and 247 [-Wformat-overflow=]
                   sprintf(ref, "cid:att%d@%s", index, domain);
                                           ^~          ~~~~~~
src/elogd.c:25278:19: note: ‘sprintf’ output between 10 and 266 bytes into a destination of size 256
                   sprintf(ref, "cid:att%d@%s", index, domain);
                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c: In function ‘compose_email’:
src/elogd.c:22630:18: warning: ‘%s’ directive writing up to 1599 bytes into a region of size 256 [-Wformat-overflow=]
    sprintf(url, "%s%d", str, message_id);
                  ^~     ~~~
src/elogd.c:22630:4: note: ‘sprintf’ output between 2 and 1611 bytes into a destination of size 256
    sprintf(url, "%s%d", str, message_id);
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c: In function ‘submit_elog’:
src/elogd.c:23108:33: warning: ‘%d’ directive writing between 1 and 3 bytes into a region of size between 0 and 1499 [-Wformat-overflow=]
                sprintf(str, "%s_%d", ua, j);
                                 ^~
src/elogd.c:23108:29: note: directive argument in the range [0, 100]
                sprintf(str, "%s_%d", ua, j);
                             ^~~~~~~
src/elogd.c:23108:16: note: ‘sprintf’ output between 3 and 1504 bytes into a destination of size 1500
                sprintf(str, "%s_%d", ua, j);
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:23269:33: warning: ‘%d’ directive writing between 1 and 3 bytes into a region of size between 0 and 1499 [-Wformat-overflow=]
                sprintf(str, "%s_%d", ua, j);
                                 ^~
src/elogd.c:23269:29: note: directive argument in the range [0, 100]
                sprintf(str, "%s_%d", ua, j);
                             ^~~~~~~
src/elogd.c:23269:16: note: ‘sprintf’ output between 3 and 1504 bytes into a destination of size 1500
                sprintf(str, "%s_%d", ua, j);
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:23647:34: warning: ‘%d’ directive writing between 1 and 10 bytes into a region of size between 0 and 1499 [-Wformat-overflow=]
                sprintf(str2, "%s_%d", ua, mindex);
                                  ^~
src/elogd.c:23647:30: note: directive argument in the range [0, 2147483647]
                sprintf(str2, "%s_%d", ua, mindex);
                              ^~~~~~~
src/elogd.c:23647:16: note: ‘sprintf’ output between 3 and 1511 bytes into a destination of size 1500
                sprintf(str2, "%s_%d", ua, mindex);
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c: In function ‘do_self_register’:
src/elogd.c:26908:27: warning: ‘%s’ directive writing up to 255 bytes into a region of size 253 [-Wformat-overflow=]
          sprintf(str, "../%s/", lbs->name_enc);
                           ^~
src/elogd.c:26908:10: note: ‘sprintf’ output between 5 and 260 bytes into a destination of size 256
          sprintf(str, "../%s/", lbs->name_enc);
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c: In function ‘show_uploader_finished’:
src/elogd.c:27149:24: warning: ‘%s’ directive writing up to 255 bytes into a region of size between 0 and 255 [-Wformat-overflow=]
       sprintf(ref, "%s/%s?lb=%s", str, file_enc, lbs->name_enc);
                        ^~              ~~~~~~~~
src/elogd.c:27149:7: note: ‘sprintf’ output between 6 and 771 bytes into a destination of size 256
       sprintf(ref, "%s/%s?lb=%s", str, file_enc, lbs->name_enc);
       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:27150:30: warning: ‘%s’ directive writing up to 255 bytes into a region of size between 0 and 255 [-Wformat-overflow=]
       sprintf(ref_thumb, "%s/%s?lb=%s&thumb=1", str, file_enc, lbs->name_enc);
                              ^~                      ~~~~~~~~
src/elogd.c:27150:7: note: ‘sprintf’ output between 14 and 779 bytes into a destination of size 256
       sprintf(ref_thumb, "%s/%s?lb=%s&thumb=1", str, file_enc, lbs->name_enc);
       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c: In function ‘interprete’:
src/elogd.c:28378:27: warning: ‘%s’ directive writing up to 1499 bytes into a region of size 1495 [-Wformat-overflow=]
       sprintf(str1, "?cmd=%s", str);
                           ^~   ~~~
src/elogd.c:28378:7: note: ‘sprintf’ output between 6 and 1505 bytes into a destination of size 1500
       sprintf(str1, "?cmd=%s", str);
       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:28382:27: warning: ‘%s’ directive writing up to 1499 bytes into a region of size 1495 [-Wformat-overflow=]
       sprintf(str2, "?cmd=%s", str);
                           ^~   ~~~
src/elogd.c:28382:7: note: ‘sprintf’ output between 6 and 1505 bytes into a destination of size 1500
       sprintf(str2, "?cmd=%s", str);
       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:28177:31: warning: ‘%s’ directive writing up to 1499 bytes into a region of size 1495 [-Wformat-overflow=]
          sprintf(str, "%s: <b>%s</b>", loc("Invalid URL"), str2);
                               ^~                           ~~~~
src/elogd.c:28177:10: note: ‘sprintf’ output 10 or more bytes (assuming 1509) into a destination of size 1500
          sprintf(str, "%s: <b>%s</b>", loc("Invalid URL"), str2);
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:27649:28: warning: ‘%s’ directive writing up to 1499 bytes into a region of size 1495 [-Wformat-overflow=]
       sprintf(str, "%s: <b>%s</b>", loc("Invalid URL"), str2);
                            ^~                           ~~~~
src/elogd.c:27649:7: note: ‘sprintf’ output 10 or more bytes (assuming 1509) into a destination of size 1500
       sprintf(str, "%s: <b>%s</b>", loc("Invalid URL"), str2);
       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c: In function ‘decode_post’:
src/elogd.c:28615:54: warning: ‘%s’ directive writing up to 1499 bytes into a region of size 1483 [-Wformat-overflow=]
                      sprintf(str, "Error: Filename \"%s\" contains invalid character", str2);
                                                      ^~                                ~~~~
src/elogd.c:28615:22: note: ‘sprintf’ output between 46 and 1545 bytes into a destination of size 1500
                      sprintf(str, "Error: Filename \"%s\" contains invalid character", str2);
                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
gcc -O3 -funroll-loops -fomit-frame-pointer -W -Wall -Wno-deprecated-declarations -Imxml -DHAVE_SSL -o elconv src/elconv.c -lssl
src/elconv.c: In function ‘ss_file_find’:
src/elconv.c:233:10: warning: ‘strncpy’ output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation]
          strncpy(*plist + (i * MAX_PATH_LENGTH), dp->d_name, strlen(dp->d_name));
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elconv.c: In function ‘el_search_message’:
src/elconv.c:325:32: warning: ‘%02d’ directive writing between 2 and 3 bytes into a region of size between 1 and 256 [-Wformat-overflow=]
          sprintf(file_name, "%s%02d%02d%02d.log", dir, tms->tm_year % 100, tms->tm_mon + 1, tms->tm_mday);
                                ^~~~
src/elconv.c:325:29: note: directive argument in the range [-99, 99]
          sprintf(file_name, "%s%02d%02d%02d.log", dir, tms->tm_year % 100, tms->tm_mon + 1, tms->tm_mday);
                             ^~~~~~~~~~~~~~~~~~~~
src/elconv.c:325:29: note: directive argument in the range [-2147483647, 2147483647]
src/elconv.c:325:10: note: ‘sprintf’ output between 11 and 285 bytes into a destination of size 256
          sprintf(file_name, "%s%02d%02d%02d.log", dir, tms->tm_year % 100, tms->tm_mon + 1, tms->tm_mday);
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elconv.c:419:32: warning: ‘%06d’ directive writing 6 bytes into a region of size between 1 and 256 [-Wformat-overflow=]
          sprintf(file_name, "%s%06d.log", dir, max % 1000000);
                                ^~~~
src/elconv.c:419:29: note: directive argument in the range [0, 999999]
          sprintf(file_name, "%s%06d.log", dir, max % 1000000);
                             ^~~~~~~~~~~~
src/elconv.c:419:10: note: ‘sprintf’ output between 11 and 266 bytes into a destination of size 256
          sprintf(file_name, "%s%06d.log", dir, max % 1000000);
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elconv.c:388:32: warning: ‘%06d’ directive writing between 6 and 7 bytes into a region of size between 1 and 256 [-Wformat-overflow=]
          sprintf(file_name, "%s%06d.log", dir, min % 1000000);
                                ^~~~
src/elconv.c:388:29: note: directive argument in the range [-999999, 999999]
          sprintf(file_name, "%s%06d.log", dir, min % 1000000);
                             ^~~~~~~~~~~~
src/elconv.c:388:10: note: ‘sprintf’ output between 11 and 267 bytes into a destination of size 256
          sprintf(file_name, "%s%06d.log", dir, min % 1000000);
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elconv.c: In function ‘el_submit’:
src/elconv.c:626:38: warning: ‘%02d’ directive writing between 2 and 3 bytes into a region of size between 1 and 256 [-Wformat-overflow=]
                sprintf(file_name, "%s%02d%02d%02d_%02d%02d%02d_%s", dir,
                                      ^~~~
src/elconv.c:626:35: note: directive argument in the range [-99, 99]
                sprintf(file_name, "%s%02d%02d%02d_%02d%02d%02d_%s", dir,
                                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elconv.c:626:35: note: directive argument in the range [-2147483647, 2147483647]
src/elconv.c:626:16: note: ‘sprintf’ output between 15 and 571 bytes into a destination of size 256
                sprintf(file_name, "%s%02d%02d%02d_%02d%02d%02d_%s", dir,
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                        tms->tm_year % 100, tms->tm_mon + 1, tms->tm_mday, tms->tm_hour,
                        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                        tms->tm_min, tms->tm_sec, str);
                        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elconv.c:690:29: warning: ‘%02d’ directive writing between 2 and 3 bytes into a region of size between 1 and 256 [-Wformat-overflow=]
       sprintf(file_name, "%s%02d%02d%02d.log", dir, tms->tm_year % 100, tms->tm_mon + 1, tms->tm_mday);
                             ^~~~
src/elconv.c:690:26: note: directive argument in the range [-99, 99]
       sprintf(file_name, "%s%02d%02d%02d.log", dir, tms->tm_year % 100, tms->tm_mon + 1, tms->tm_mday);
                          ^~~~~~~~~~~~~~~~~~~~
src/elconv.c:690:26: note: directive argument in the range [-2147483647, 2147483647]
src/elconv.c:690:7: note: ‘sprintf’ output between 11 and 285 bytes into a destination of size 256
       sprintf(file_name, "%s%02d%02d%02d.log", dir, tms->tm_year % 100, tms->tm_mon + 1, tms->tm_mday);
       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elconv.c:656:29: warning: ‘%s’ directive writing up to 255 bytes into a region of size between 1 and 256 [-Wformat-overflow=]
       sprintf(file_name, "%s%s.log", dir, str);
                             ^~            ~~~
src/elconv.c:656:7: note: ‘sprintf’ output between 5 and 515 bytes into a destination of size 256
       sprintf(file_name, "%s%s.log", dir, str);
       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elconv.c: In function ‘scan_messages’:
src/elconv.c:981:29: warning: ‘%s’ directive writing up to 255 bytes into a region of size between 1 and 256 [-Wformat-overflow=]
       sprintf(file_name, "%s%sa.log", data_dir, str);
                             ^~                  ~~~
src/elconv.c:981:7: note: ‘sprintf’ output between 6 and 516 bytes into a destination of size 256
       sprintf(file_name, "%s%sa.log", data_dir, str);
       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 

 

 

 

Andreas Luedeke wrote:

Stefan said "code is commited": that means you can download the latest version from https://bitbucket.org/ritt/elog, as described in https://elog.psi.ch/elog/download.html, and then compile it. Clear now?

Stefan Ritt wrote:

This warning is triggered by the use of the sprintf() funciton, which can write beyond the boundary of the destination string. I replaced it by snprintf(), which should make the compiler happy. Code is committed. Unfortuantely I have no FC27 here, so if there is still some waring with the current code, please post the full warning list here.

Stefan

 

 

  758   Mon Nov 1 10:32:57 2004 Question Stefan Rittstefan.ritt@psi.chQuestion 2.5.4-6Re: Compile of Elog
> If I make changes to the elog source, How do I re-compile it and not 
> distrupt the program??????

There ist only a problem if you replace the currently running executable. You
sould first stop elogd, then replace the executable, then restart it. This ist
true both for Windows and Linux.
  759   Mon Nov 1 13:45:47 2004 Reply Stefan Rittstefan.ritt@psi.chQuestionAll2.5.4-6Re: Compile of Elog
> If I make changes to the elog source, How do I re-compile it and not 
> distrupt the program??????

You first have to stop the running elogd server, then replace the executable,
then restart the server.
  1563   Thu Dec 22 08:53:43 2005 Reply Stefan Rittstefan.ritt@psi.chQuestion 2.6.0Re: Compile on Windows?

Mike wrote:
What version of Visual Studio do you use for compile Elog on windows.

I have downloaded the Tar from svn and am having some errors, but then I've go VS.Net 2003. I wondering if this was done with 6.0?


Right now I'm using VS.Net 2003, but you should be able to compile it with 6.0, except that you have to redo the project file, which might not be backwards compatible. An alternative is to use gcc under cygwin, which is a free alternative for windows.
  67258   Tue May 1 17:03:37 2012 Agree Per Erikssonpelle@sm4xiu.euInfoLinuxAnyRe: Compiling Elog for QNAP NAS x86

Per Eriksson wrote:

Hi All,

I am interested to have ELOG installed in my QNAP x86 based NAS (239 Pro II)
Have someone done this already or is there a write-up of a normal compile-procedure which I can have as a base when I attempt to compile?

Regards,

Per

I solved it.
I don't really know if I really needed to compile it but I complied this on the NAS itself so now it is 100% compatible (I believe)

Per

  67294   Sun Jul 1 19:55:38 2012 Reply Per Erikssonpelle@sm4xiu.euInfoLinuxAnyRe: Compiling Elog for QNAP NAS x86

Per Eriksson wrote:

Per Eriksson wrote:

Hi All,

I am interested to have ELOG installed in my QNAP x86 based NAS (239 Pro II)
Have someone done this already or is there a write-up of a normal compile-procedure which I can have as a base when I attempt to compile?

Regards,

Per

I solved it.
I don't really know if I really needed to compile it but I complied this on the NAS itself so now it is 100% compatible (I believe)

Per

 I managed to package Elog v2.92 build 2462 into and QNAP installer QPKG package.

This is for x86 based QNAP NAS only.

Note: You must have adduser package installed prior to installation.
Login to the NAS with SSH and type:
apt-get update
apt-get install adduser


BR,

Per

Attachment 1: Elog_2.9.2_2462.qpkg
  62   Tue Jul 9 09:33:47 2002 Reply Stefan Rittstefan.ritt@psi.chBug fix  Re: Compiling elog 2.0.4 on Solaris
> Comiling elogd 2.0.4 under Solaris obviously fails with
> 
> gcc  -o elog elog.c -lsocket -lnsl
> gcc  -o elogd elogd.c -lsocket -lnsl
> elogd.c: In function `ss_file_find':
> elogd.c:1372: `alphasort' undeclared (first use in this function)
> elogd.c:1372: (Each undeclared identifier is reported only once
> elogd.c:1372: for each function it appears in.)
> make: *** [elogd] Error 1
> 
> because alphasort is an ucb'ism which does not exist under SYSV
> 
> ... not very portable :-(

I was not aware of this. Actually, I don't need 'alphasort' so I removed it 
from the source. The update is at

http://midas.psi.ch/cgi-bin/cvsweb/elog/elogd.c

Please give it a try.
ELOG V3.1.5-fe60aaf