Demo Discussion
Forum Config Examples Contributions Vulnerabilities
  Discussion forum about ELOG, Page 35 of 806  Not logged in ELOG logo
ID Date Icon Author Author Email Category OS ELOG Versiondown Subject
  68574   Wed Feb 8 09:34:39 2017 Reply Christine Quicotc.quicot@free.frQuestionLinuxcommit a6e5962Re: Is it possible change content of the notifying mail content (attachements...) ?

Hello,

I'm sorry but that's a part of the manual I've read many times, and I'm not interested in changing the subject of the email, but only body and attachements.

I guess that if I didn't find these answers in the manual, it's because the answer for both questions is no ?

 

Thank you

Stefan Ritt wrote:

Please look in the manual under "Email Format" and "Use Email Subject".

Christine Quicot wrote:

Hello all,

I would like to configure the email that is sent to notify users, when an entry is submitted:

- Is it possible to attach to the mail the files attached to the entry ?

- Is it possible to configure a string (with entry keywords) that will appear in the mail content instead of the default content ?

 

Thank you!

Christine

 

 

 

  68575   Wed Feb 8 13:09:58 2017 Reply Stefan Rittstefan.ritt@psi.chQuestionLinuxcommit a6e5962Re: Is it possible change content of the notifying mail content (attachements...) ?

I'm sorry but you are only half right. The mail contenct cannot be changed. But if your email notifications are sent as HTML, they contain a 1:1 copy of the elog entry, which does not make sense to change. For the attachment to be attached to the email, you need the flags of "Email Format". The default there is 63, which means that elog attachments ARE sent as mail attachments.

Christine Quicot wrote:

Hello,

I'm sorry but that's a part of the manual I've read many times, and I'm not interested in changing the subject of the email, but only body and attachements.

I guess that if I didn't find these answers in the manual, it's because the answer for both questions is no ?

 

Thank you

Stefan Ritt wrote:

Please look in the manual under "Email Format" and "Use Email Subject".

Christine Quicot wrote:

Hello all,

I would like to configure the email that is sent to notify users, when an entry is submitted:

- Is it possible to attach to the mail the files attached to the entry ?

- Is it possible to configure a string (with entry keywords) that will appear in the mail content instead of the default content ?

 

Thank you!

Christine

 

 

 

 

  69847   Sun Dec 8 22:00:32 2024 Idea Liam Gaffneyliam.gaffney@liverpool.ac.ukRequestLinuxcommit 6ee1005Reuqest to extract X-Forwarded-Name and X-Forwarded-Email when using webserver

When using the Webserver authentication in combination with "File" and "Self register = 3", it is possible to keep track of registrations and control access still. This is very useful, and upon clicking on the logbook for the first time, the user is asked to register by typing their username, full name and email address.

First issue here is that they can still edit the box with their username, which might cause confusion if somebody decides to choose a different username and is then surprised about why they cannot automatically login again. Is it possible to lock this field from being edited?

The second issue is more minor, but the user has to manually type their name and email address, even though the webserver may already be able to provide this information in the headers. Specifically, it would be useful to read the name from the X-Forwarded-Name header and email address from the X-Forwarded-Email header. 

My config file snippet is below:

Authentication = Webserver, File
allow password change = 0
Password file = webserver.passwords
Self register    = 3
 

  69871   Wed Apr 2 13:01:34 2025 Warning Liam Gaffneyliam.gaffney@liverpool.ac.ukBug reportLinuxcommit 30ada1dfNew elog from template should update the subdir

Hello. We are using explicity subdir names on our elog server to manage a large number of "Top groups" and sub "groups". When we create a new logbook from a template in the same group, it would be beneficial to automatically give a new subdir based on the previous one. At the very least, it should not reuse the same parameter as the template (see below).

At the moment, it copies the subdir parameter from the template logbook, which results in the new logbook writing to the same location as the template. That is very confusing and has the potential to be harmful as people can (and recently did) decide to delete these "duplicate" entries. But they are not duplicates, they are the exact same entries as the template logbook and deleting them removes them forever!

The way around this at the moment is to manually update the subdir after copying, but then the logbooks need to be re-indexed before the new logbook will display correctly. That requires a manual restart of the elogd process, which is less than ideal. 

  69793   Wed May 15 01:07:12 2024 Warning Konstantin Olchanskiolchansk@triumf.caBug reportLinuxcommit 2eba8869elog sprintf() buffer overflows on ubuntu-22
I get the following compiler warnings about sprintf() buffer overflows. I suggest sprintf() should be replaced by std::string msprintf() from 
midas. K.O.

iris00:~/packages> git clone https://bitbucket.org/ritt/elog --recursive
Cloning into 'elog'...
remote: Enumerating objects: 18297, done.
remote: Counting objects: 100% (18297/18297), done.
remote: Compressing objects: 100% (7710/7710), done.
remote: Total 18297 (delta 11462), reused 16637 (delta 10243), pack-reused 0 (from 0)
Receiving objects: 100% (18297/18297), 14.56 MiB | 17.14 MiB/s, done.
Resolving deltas: 100% (11462/11462), done.
Submodule 'mxml' (https://bitbucket.org/tmidas/mxml) registered for path 'mxml'
Cloning into '/home/iris/packages/elog/mxml'...
remote: Enumerating objects: 356, done.        
remote: Counting objects: 100% (356/356), done.        
remote: Compressing objects: 100% (242/242), done.        
remote: Total 356 (delta 162), reused 265 (delta 112), pack-reused 0 (from 0)        
Receiving objects: 100% (356/356), 85.65 KiB | 10.71 MiB/s, done.
Resolving deltas: 100% (162/162), done.
Submodule path 'mxml': checked out '4d4b4cf17bec323a76b8a87605efec6a4822bebf'
iris00:~/packages> cd elo
elog/      elog-2012/ 
iris00:~/packages> cd elog
iris00:~/packages/elog> make
c++ -O3 -funroll-loops -fomit-frame-pointer -W -Wall -Wno-deprecated-declarations -Wno-unused-result -Imxml -DHAVE_SSL -c -o mxml.o mxml/mxml.cxx
c++ -O3 -funroll-loops -fomit-frame-pointer -W -Wall -Wno-deprecated-declarations -Wno-unused-result -Imxml -DHAVE_SSL -w -c -o crypt.o 
src/crypt.cxx
c++ -O3 -funroll-loops -fomit-frame-pointer -W -Wall -Wno-deprecated-declarations -Wno-unused-result -Imxml -DHAVE_SSL -c -o strlcpy.o 
mxml/strlcpy.cxx
type git &> /dev/null; if [ $? -eq 1 ]; then REV="unknown" ;else REV=`git log -n 1 --pretty=format:"%ad - %h"`; fi; echo \#define GIT_REVISION 
\"$REV\" > src/git-revision.h
git is /bin/git
c++ -O3 -funroll-loops -fomit-frame-pointer -W -Wall -Wno-deprecated-declarations -Wno-unused-result -Imxml -DHAVE_SSL -o elog src/elog.cxx 
mxml.o crypt.o strlcpy.o -lssl
c++ -O3 -funroll-loops -fomit-frame-pointer -W -Wall -Wno-deprecated-declarations -Wno-unused-result -Imxml -DHAVE_SSL -w -c -o auth.o 
src/auth.cxx
c++ -O3 -funroll-loops -fomit-frame-pointer -W -Wall -Wno-deprecated-declarations -Wno-unused-result -Imxml -DHAVE_SSL -o elogd src/elogd.cxx 
auth.o mxml.o crypt.o strlcpy.o -lssl
src/elogd.cxx: In function ‘int el_submit(LOGBOOK*, int, BOOL, const char*, char (*)[1500], char (*)[1500], int, const char*, const char*, const 
char*, const char*, const char (*)[256], BOOL, const char*, const char*)’:
src/elogd.cxx:4960:47: warning: ‘%s’ directive writing up to 149999 bytes into a region of size between 100103 and 250102 [-Wformat-overflow=]
 4960 |       sprintf(message + strlen(message), "%s: %s\n", attr_name[i], attrib[i]);
      |                                               ^~
In file included from /usr/include/stdio.h:894,
                 from src/elogd.h:42,
                 from src/elogd.cxx:38:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:38:34: note: ‘__builtin___sprintf_chk’ output between 4 and 300002 bytes into a destination of size 
250104
   38 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   39 |                                   __glibc_objsize (__s), __fmt,
      |                                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   40 |                                   __va_arg_pack ());
      |                                   ~~~~~~~~~~~~~~~~~
src/elogd.cxx: In function ‘void show_edit_form(LOGBOOK*, int, BOOL, BOOL, BOOL, BOOL, BOOL, BOOL)’:
src/elogd.cxx:9659:28: warning: ‘%s’ directive writing up to 149999 bytes into a region of size 3993 [-Wformat-overflow=]
 9659 |       sprintf(str, "Preset %s", attr_list[index]);
      |                            ^~
In file included from /usr/include/stdio.h:894,
                 from src/elogd.h:42,
                 from src/elogd.cxx:38:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:38:34: note: ‘__builtin___sprintf_chk’ output between 8 and 150007 bytes into a destination of size 
4000
   38 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   39 |                                   __glibc_objsize (__s), __fmt,
      |                                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   40 |                                   __va_arg_pack ());
      |                                   ~~~~~~~~~~~~~~~~~
src/elogd.cxx:9680:43: warning: ‘%s’ directive writing up to 149999 bytes into a region of size 3978 [-Wformat-overflow=]
 9680 |       sprintf(str, "Preset on first reply %s", attr_list[index]);
      |                                           ^~
In file included from /usr/include/stdio.h:894,
                 from src/elogd.h:42,
                 from src/elogd.cxx:38:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:38:34: note: ‘__builtin___sprintf_chk’ output between 23 and 150022 bytes into a destination of size 
4000
   38 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   39 |                                   __glibc_objsize (__s), __fmt,
      |                                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   40 |                                   __va_arg_pack ());
      |                                   ~~~~~~~~~~~~~~~~~
src/elogd.cxx:9701:37: warning: ‘%s’ directive writing up to 149999 bytes into a region of size 3984 [-Wformat-overflow=]
 9701 |       sprintf(str, "Preset on reply %s", attr_list[index]);
      |                                     ^~
In file included from /usr/include/stdio.h:894,
                 from src/elogd.h:42,
                 from src/elogd.cxx:38:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:38:34: note: ‘__builtin___sprintf_chk’ output between 17 and 150016 bytes into a destination of size 
4000
   38 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   39 |                                   __glibc_objsize (__s), __fmt,
      |                                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   40 |                                   __va_arg_pack ());
      |                                   ~~~~~~~~~~~~~~~~~
src/elogd.cxx:9701:37: warning: ‘%s’ directive writing up to 149999 bytes into a region of size 3984 [-Wformat-overflow=]
 9701 |       sprintf(str, "Preset on reply %s", attr_list[index]);
      |                                     ^~
In file included from /usr/include/stdio.h:894,
                 from src/elogd.h:42,
                 from src/elogd.cxx:38:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:38:34: note: ‘__builtin___sprintf_chk’ output between 17 and 150016 bytes into a destination of size 
4000
   38 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   39 |                                   __glibc_objsize (__s), __fmt,
      |                                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   40 |                                   __va_arg_pack ());
      |                                   ~~~~~~~~~~~~~~~~~
src/elogd.cxx:9701:37: warning: ‘%s’ directive writing up to 149999 bytes into a region of size 3984 [-Wformat-overflow=]
 9701 |       sprintf(str, "Preset on reply %s", attr_list[index]);
      |                                     ^~
In file included from /usr/include/stdio.h:894,
                 from src/elogd.h:42,
                 from src/elogd.cxx:38:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:38:34: note: ‘__builtin___sprintf_chk’ output between 17 and 150016 bytes into a destination of size 
4000
   38 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   39 |                                   __glibc_objsize (__s), __fmt,
      |                                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   40 |                                   __va_arg_pack ());
      |                                   ~~~~~~~~~~~~~~~~~
src/elogd.cxx:9701:37: warning: ‘%s’ directive writing up to 149999 bytes into a region of size 3984 [-Wformat-overflow=]
 9701 |       sprintf(str, "Preset on reply %s", attr_list[index]);
      |                                     ^~
In file included from /usr/include/stdio.h:894,
                 from src/elogd.h:42,
                 from src/elogd.cxx:38:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:38:34: note: ‘__builtin___sprintf_chk’ output between 17 and 150016 bytes into a destination of size 
4000
   38 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   39 |                                   __glibc_objsize (__s), __fmt,
      |                                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   40 |                                   __va_arg_pack ());
      |                                   ~~~~~~~~~~~~~~~~~
src/elogd.cxx:9721:36: warning: ‘%s’ directive writing up to 149999 bytes into a region of size 3985 [-Wformat-overflow=]
 9721 |       sprintf(str, "Preset on edit %s", attr_list[index]);
      |                                    ^~
In file included from /usr/include/stdio.h:894,
                 from src/elogd.h:42,
                 from src/elogd.cxx:38:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:38:34: note: ‘__builtin___sprintf_chk’ output between 16 and 150015 bytes into a destination of size 
4000
   38 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   39 |                                   __glibc_objsize (__s), __fmt,
      |                                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   40 |                                   __va_arg_pack ());
      |                                   ~~~~~~~~~~~~~~~~~
src/elogd.cxx:9741:41: warning: ‘%s’ directive writing up to 149999 bytes into a region of size 3980 [-Wformat-overflow=]
 9741 |       sprintf(str, "Preset on duplicate %s", attr_list[index]);
      |                                         ^~
In file included from /usr/include/stdio.h:894,
                 from src/elogd.h:42,
                 from src/elogd.cxx:38:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:38:34: note: ‘__builtin___sprintf_chk’ output between 21 and 150020 bytes into a destination of size 
4000
   38 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   39 |                                   __glibc_objsize (__s), __fmt,
      |                                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   40 |                                   __va_arg_pack ());
      |                                   ~~~~~~~~~~~~~~~~~
src/elogd.cxx:9762:22: warning: ‘%s’ directive writing up to 149999 bytes into a region of size 3999 [-Wformat-overflow=]
 9762 |       sprintf(str, "p%s", attr_list[index]);
      |                      ^~
In file included from /usr/include/stdio.h:894,
                 from src/elogd.h:42,
                 from src/elogd.cxx:38:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:38:34: note: ‘__builtin___sprintf_chk’ output between 2 and 150001 bytes into a destination of size 
4000
   38 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   39 |                                   __glibc_objsize (__s), __fmt,
      |                                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   40 |                                   __va_arg_pack ());
      |                                   ~~~~~~~~~~~~~~~~~
src/elogd.cxx:9780:31: warning: ‘%s’ directive writing up to 149999 bytes into a region of size 3993 [-Wformat-overflow=]
 9780 |          sprintf(str, "Preset %s", attr_list[index]);
      |                               ^~
In file included from /usr/include/stdio.h:894,
                 from src/elogd.h:42,
                 from src/elogd.cxx:38:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:38:34: note: ‘__builtin___sprintf_chk’ output between 8 and 150007 bytes into a destination of size 
4000
   38 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   39 |                                   __glibc_objsize (__s), __fmt,
      |                                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   40 |                                   __va_arg_pack ());
      |                                   ~~~~~~~~~~~~~~~~~
src/elogd.cxx:9801:40: warning: ‘%s’ directive writing up to 149999 bytes into a region of size 3984 [-Wformat-overflow=]
 9801 |          sprintf(str, "Preset on reply %s", attr_list[index]);
      |                                        ^~
In file included from /usr/include/stdio.h:894,
                 from src/elogd.h:42,
                 from src/elogd.cxx:38:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:38:34: note: ‘__builtin___sprintf_chk’ output between 17 and 150016 bytes into a destination of size 
4000
   38 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   39 |                                   __glibc_objsize (__s), __fmt,
      |                                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   40 |                                   __va_arg_pack ());
      |                                   ~~~~~~~~~~~~~~~~~
src/elogd.cxx:9821:44: warning: ‘%s’ directive writing up to 149999 bytes into a region of size 3980 [-Wformat-overflow=]
 9821 |          sprintf(str, "Preset on duplicate %s", attr_list[index]);
      |                                            ^~
In file included from /usr/include/stdio.h:894,
                 from src/elogd.h:42,
                 from src/elogd.cxx:38:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:38:34: note: ‘__builtin___sprintf_chk’ output between 21 and 150020 bytes into a destination of size 
4000
   38 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   39 |                                   __glibc_objsize (__s), __fmt,
      |                                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   40 |                                   __va_arg_pack ());
      |                                   ~~~~~~~~~~~~~~~~~
src/elogd.cxx: In function ‘void show_elog_list(LOGBOOK*, int, int, int, BOOL, char*)’:
src/elogd.cxx:20448:43: warning: ‘%s’ directive writing up to 149999 bytes into a region of size 1587 [-Wformat-overflow=]
20448 |                sprintf(str, "Icon comment %s", attrib[i]);
      |                                           ^~
In file included from /usr/include/stdio.h:894,
                 from src/elogd.h:42,
                 from src/elogd.cxx:38:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:38:34: note: ‘__builtin___sprintf_chk’ output between 14 and 150013 bytes into a destination of size 
1600
   38 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   39 |                                   __glibc_objsize (__s), __fmt,
      |                                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   40 |                                   __va_arg_pack ());
      |                                   ~~~~~~~~~~~~~~~~~
src/elogd.cxx:20495:33: warning: ‘%s’ directive writing up to 149999 bytes into a region of size 1600 [-Wformat-overflow=]
20495 |                   sprintf(str, "%s_%d", attr_list[i], j);
      |                                 ^~
src/elogd.cxx:20495:32: note: directive argument in the range [0, 99]
20495 |                   sprintf(str, "%s_%d", attr_list[i], j);
      |                                ^~~~~~~
In file included from /usr/include/stdio.h:894,
                 from src/elogd.h:42,
                 from src/elogd.cxx:38:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:38:34: note: ‘__builtin___sprintf_chk’ output between 3 and 150003 bytes into a destination of size 
1600
   38 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   39 |                                   __glibc_objsize (__s), __fmt,
      |                                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   40 |                                   __va_arg_pack ());
      |                                   ~~~~~~~~~~~~~~~~~
src/elogd.cxx:20459:33: warning: ‘%s’ directive writing up to 149999 bytes into a region of size 1600 [-Wformat-overflow=]
20459 |                   sprintf(str, "%s_%d", attr_list[i], j);
      |                                 ^~
src/elogd.cxx:20459:32: note: directive argument in the range [0, 99]
20459 |                   sprintf(str, "%s_%d", attr_list[i], j);
      |                                ^~~~~~~
In file included from /usr/include/stdio.h:894,
                 from src/elogd.h:42,
                 from src/elogd.cxx:38:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:38:34: note: ‘__builtin___sprintf_chk’ output between 3 and 150003 bytes into a destination of size 
1600
   38 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   39 |                                   __glibc_objsize (__s), __fmt,
      |                                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   40 |                                   __va_arg_pack ());
      |                                   ~~~~~~~~~~~~~~~~~
src/elogd.cxx:21041:30: warning: ‘%s’ directive writing up to 149999 bytes into a region of size 1600 [-Wformat-overflow=]
21041 |                sprintf(str, "%s_%d", attr_list[i], j);
      |                              ^~
src/elogd.cxx:21041:29: note: directive argument in the range [0, 99]
21041 |                sprintf(str, "%s_%d", attr_list[i], j);
      |                             ^~~~~~~
In file included from /usr/include/stdio.h:894,
                 from src/elogd.h:42,
                 from src/elogd.cxx:38:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:38:34: note: ‘__builtin___sprintf_chk’ output between 3 and 150003 bytes into a destination of size 
1600
   38 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   39 |                                   __glibc_objsize (__s), __fmt,
      |                                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   40 |                                   __va_arg_pack ());
      |                                   ~~~~~~~~~~~~~~~~~
src/elogd.cxx:21527:45: warning: ‘%s’ directive writing up to 149999 bytes into a region of size 1588 [-Wformat-overflow=]
21527 |                   sprintf(str, "Time format %s", attr_list[i]);
      |                                             ^~
In file included from /usr/include/stdio.h:894,
                 from src/elogd.h:42,
                 from src/elogd.cxx:38:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:38:34: note: ‘__builtin___sprintf_chk’ output between 13 and 150012 bytes into a destination of size 
1600
   38 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   39 |                                   __glibc_objsize (__s), __fmt,
      |                                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   40 |                                   __va_arg_pack ());
      |                                   ~~~~~~~~~~~~~~~~~
src/elogd.cxx:21512:45: warning: ‘%s’ directive writing up to 149999 bytes into a region of size 1588 [-Wformat-overflow=]
21512 |                   sprintf(str, "Date format %s", attr_list[i]);
      |                                             ^~
In file included from /usr/include/stdio.h:894,
                 from src/elogd.h:42,
                 from src/elogd.cxx:38:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:38:34: note: ‘__builtin___sprintf_chk’ output between 13 and 150012 bytes into a destination of size 
1600
   38 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   39 |                                   __glibc_objsize (__s), __fmt,
      |                                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   40 |                                   __va_arg_pack ());
      |                                   ~~~~~~~~~~~~~~~~~
src/elogd.cxx: In function ‘void submit_elog(LOGBOOK*)’:
src/elogd.cxx:23282:38: warning: ‘%s’ directive writing up to 149999 bytes into a region of size 2034 [-Wformat-overflow=]
23282 |          sprintf(str, "Subst on edit %s", attr_list[index]);
      |                                      ^~
In file included from /usr/include/stdio.h:894,
                 from src/elogd.h:42,
                 from src/elogd.cxx:38:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:38:34: note: ‘__builtin___sprintf_chk’ output between 15 and 150014 bytes into a destination of size 
2048
   38 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   39 |                                   __glibc_objsize (__s), __fmt,
      |                                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   40 |                                   __va_arg_pack ());
      |                                   ~~~~~~~~~~~~~~~~~
c++ -O3 -funroll-loops -fomit-frame-pointer -W -Wall -Wno-deprecated-declarations -Wno-unused-result -Imxml -DHAVE_SSL -o elconv src/elconv.cxx -
lssl
iris00:~/packages/elog> git log
commit 2eba8869bb72561f3f19f9b675ec74ba738f2443 (HEAD -> master, origin/master, origin/HEAD)
Author: Stefan Ritt <stefan.ritt@psi.ch>
Date:   Fri May 3 16:04:21 2024 +0200

    Removed unused variables

commit 8f942d1d18cc7d4d9b12f049dfd67284e3289963
Author: Stefan Ritt <stefan.ritt@psi.ch>
Date:   Fri May 3 15:50:17 2024 +0200

    Disabled attachment file retrieval to prevent poxy mis-use

commit 3020557a2b52cc9c460b80313c7c61c3ee014896
Author: Stefan Ritt <stefan.ritt@psi.ch>
Date:   Tue Apr 16 13:29:35 2024 +0200

    Fixed typos

commit 3876ffa2cc22a355cad8da642cb6f5a35884597a
Author: Stefan Ritt <stefan.ritt@psi.ch>
Date:   Mon Apr 15 18:04:52 2024 +0200

    Fixed line break

commit a644db7f2c14210e8014dc2a3dc9960e1382ccc1
Author: Stefan Ritt <stefan.ritt@psi.ch>
Date:   Mon Apr 15 18:00:54 2024 +0200

    Updated MacOSX command

commit fe60aaf0c41dcfafa50042e415f576faf82b1d4b
Author: Stefan Ritt <stefan.ritt@psi.ch>
Date:   Thu Mar 14 21:17:01 2024 +0100

    Fixed wrong number of attachments display

Broken pipe
iris00:~/packages/elog> 
  69833   Wed Sep 25 13:19:29 2024 Reply Stefan Rittstefan.ritt@psi.chBug reportLinuxcommit 2eba8869Re: elog sprintf() buffer overflows on ubuntu-22
> I get the following compiler warnings about sprintf() buffer overflows. I suggest sprintf() should be replaced by std::string msprintf() from 
> midas. K.O.

I started to convert some sprintf() to snprintf(), but I still have 824 cases to go... Ideally, all should be converted to std::string. Will be some job for my retirement ;-)

Stefan
  69467   Tue Feb 8 00:52:47 2022 Warning Konstantin Olchanskiolchansk@triumf.caBug reportLinuxcb3afcd826d26bfmake all messages on ubuntu LTS 20.04.03
For the record, compiler messages from elog tip of branch elog/master.

Most of the stuff is the usual same-old that we mostly fixed in midas:
- strncpy() checker never heard of fix-length strings (confusion about NUL termination)
- return status of system calls should be checked (really! make sure to print both the numeric errno and the corresponding 
strerror() description!)
- sprintf() buffer overruns (nice to have this checked automatically)
- maybe some more stuff but I cannot see it in the noise.

I could fix some of this, but I do not have permission to commit into elog git repository. (I think)

darkside@daq00:~/packages/elog$ git log -n 1 --pretty=format:"%ad - %h"
Mon Oct 25 13:36:10 2021 +0200 - cb3afcd8

darkside@daq00:~/packages/elog$ gcc -v
gcc version 9.3.0 (Ubuntu 9.3.0-17ubuntu1~20.04) 

gcc -O3 -funroll-loops -fomit-frame-pointer -W -Wall -Wno-deprecated-declarations -Wno-unused-results -Imxml -DHAVE_SSL -c -o mxml.o 
mxml/mxml.c
mxml/mxml.c: In function ‘mxml_parse_entity’:
mxml/mxml.c:1901:38: warning: ‘__builtin___sprintf_chk’ may write a terminating nul past the end of the destination [-Wformat-
overflow=]
 1901 |             sprintf(filename, "%s%c%s", directoryname, DIR_SEPARATOR, entity_reference_name[i]);
      |                                      ^
In file included from /usr/include/stdio.h:867,
                 from mxml/mxml.c:58:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output 2 or more bytes (assuming 4097) into a 
destination of size 4096
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
mxml/mxml.c: At top level:
cc1: warning: unrecognized command line option ‘-Wno-unused-results’
gcc -O3 -funroll-loops -fomit-frame-pointer -W -Wall -Wno-deprecated-declarations -Wno-unused-results -Imxml -DHAVE_SSL -w -c -o 
crypt.o src/crypt.c
gcc -O3 -funroll-loops -fomit-frame-pointer -W -Wall -Wno-deprecated-declarations -Wno-unused-results -Imxml -DHAVE_SSL -w -c -o 
regex.o src/regex.c
gcc -O3 -funroll-loops -fomit-frame-pointer -W -Wall -Wno-deprecated-declarations -Wno-unused-results -Imxml -DHAVE_SSL -c -o 
strlcpy.o mxml/strlcpy.c
gcc -O3 -funroll-loops -fomit-frame-pointer -W -Wall -Wno-deprecated-declarations -Wno-unused-results -Imxml -DHAVE_SSL -o elog 
src/elog.c mxml.o crypt.o regex.o strlcpy.
o -lssl
In file included from /usr/include/string.h:495,
                 from src/elog.c:34:
In function ‘strncpy’,
    inlined from ‘retrieve_elog’ at src/elog.c:528:13:
/usr/include/x86_64-linux-gnu/bits/string_fortified.h:106:10: warning: ‘__builtin_strncpy’ specified bound 256 equals destination 
size [-Wstringop-truncation]
  106 |   return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest));
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function ‘strncpy’,
    inlined from ‘submit_elog’ at src/elog.c:986:10:
/usr/include/x86_64-linux-gnu/bits/string_fortified.h:106:10: warning: ‘__builtin_strncpy’ specified bound 80 equals destination 
size [-Wstringop-truncation]
  106 |   return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest));
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function ‘strncpy’,
    inlined from ‘submit_elog’ at src/elog.c:981:10:
/usr/include/x86_64-linux-gnu/bits/string_fortified.h:106:10: warning: ‘__builtin_strncpy’ specified bound 80 equals destination 
size [-Wstringop-truncation]
  106 |   return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest));
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function ‘strncpy’,
    inlined from ‘submit_elog’ at src/elog.c:960:13:
/usr/include/x86_64-linux-gnu/bits/string_fortified.h:106:10: warning: ‘__builtin_strncpy’ specified bound 80 equals destination 
size [-Wstringop-truncation]
  106 |   return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest));
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elog.c: At top level:
cc1: warning: unrecognized command line option ‘-Wno-unused-results’
gcc -O3 -funroll-loops -fomit-frame-pointer -W -Wall -Wno-deprecated-declarations -Wno-unused-results -Imxml -DHAVE_SSL -w -c -o 
auth.o src/auth.c
gcc -O3 -funroll-loops -fomit-frame-pointer -W -Wall -Wno-deprecated-declarations -Wno-unused-results -Imxml -DHAVE_SSL -o elogd 
src/elogd.c auth.o mxml.o crypt.o regex.o
 strlcpy.o -lssl
src/elogd.c: In function ‘my_shell’:
src/elogd.c:979:10: warning: ignoring return value of ‘read’, declared with attribute warn_unused_result [-Wunused-result]
  979 |          read(fh, result, size - 1);
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:1035:7: warning: ignoring return value of ‘system’, declared with attribute warn_unused_result [-Wunused-result]
 1035 |       system(str);
      |       ^~~~~~~~~~~
src/elogd.c: In function ‘setegroup’:
src/elogd.c:1740:7: warning: ignoring return value of ‘chown’, declared with attribute warn_unused_result [-Wunused-result]
 1740 |       chown(logbook_dir, -1, gr->gr_gid);
      |       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c: In function ‘seteuser’:
src/elogd.c:1764:7: warning: ignoring return value of ‘chown’, declared with attribute warn_unused_result [-Wunused-result]
 1764 |       chown(logbook_dir, pw->pw_uid, -1);
      |       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c: In function ‘ss_daemon_init’:
src/elogd.c:2683:4: warning: ignoring return value of ‘chdir’, declared with attribute warn_unused_result [-Wunused-result]
 2683 |    chdir("/");                  /* change working direcotry (not on NFS!) */
      |    ^~~~~~~~~~
src/elogd.c: In function ‘parse_config_file’:
src/elogd.c:2900:4: warning: ignoring return value of ‘read’, declared with attribute warn_unused_result [-Wunused-result]
 2900 |    read(fh, buffer, length);
      |    ^~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c: In function ‘check_language’:
src/elogd.c:3253:10: warning: ignoring return value of ‘read’, declared with attribute warn_unused_result [-Wunused-result]
 3253 |          read(fh, _locbuffer, length);
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c: In function ‘parse_file’:
src/elogd.c:3894:7: warning: ignoring return value of ‘read’, declared with attribute warn_unused_result [-Wunused-result]
 3894 |       read(fh, buffer, length);
      |       ^~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c: In function ‘el_index_logbooks’:
src/elogd.c:4179:7: warning: ignoring return value of ‘getcwd’, declared with attribute warn_unused_result [-Wunused-result]
 4179 |       getcwd(cwd, sizeof(cwd));
      |       ^~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:4185:13: warning: ignoring return value of ‘chdir’, declared with attribute warn_unused_result [-Wunused-result]
 4185 |             chdir(DIR_SEPARATOR_STR);
      |             ^~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:4195:13: warning: ignoring return value of ‘chdir’, declared with attribute warn_unused_result [-Wunused-result]
 4195 |             chdir(str);
      |             ^~~~~~~~~~
src/elogd.c:4226:16: warning: ignoring return value of ‘chdir’, declared with attribute warn_unused_result [-Wunused-result]
 4226 |                chdir(str);
      |                ^~~~~~~~~~
src/elogd.c:4232:7: warning: ignoring return value of ‘chdir’, declared with attribute warn_unused_result [-Wunused-result]
 4232 |       chdir(cwd);
      |       ^~~~~~~~~~
src/elogd.c: In function ‘el_submit_attachment’:
src/elogd.c:4658:10: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Wunused-result]
 4658 |          write(fh, buffer, buffer_size);
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/elogd.c:38:
src/elogd.c: In function ‘el_submit’:
src/elogd.h:162:22: warning: ignoring return value of ‘ftruncate’, declared with attribute warn_unused_result [-Wunused-result]
  162 | #define TRUNCATE(fh) ftruncate(fh, TELL(fh))
      |                      ^~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:5085:7: note: in expansion of macro ‘TRUNCATE’
 5085 |       TRUNCATE(fh);
      |       ^~~~~~~~
src/elogd.c: In function ‘el_delete_message’:
src/elogd.c:5297:7: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Wunused-result]
 5297 |       write(fh, buffer, tail_size);
      |       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/elogd.c:38:
src/elogd.h:162:22: warning: ignoring return value of ‘ftruncate’, declared with attribute warn_unused_result [-Wunused-result]
  162 | #define TRUNCATE(fh) ftruncate(fh, TELL(fh))
      |                      ^~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:5302:4: note: in expansion of macro ‘TRUNCATE’
 5302 |    TRUNCATE(fh);
      |    ^~~~~~~~
src/elogd.c: In function ‘write_logfile’:
src/elogd.c:5621:4: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Wunused-result]
 5621 |    write(fh, buf, strlen(buf));
      |    ^~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c: In function ‘is_full_html’:
src/elogd.c:5745:4: warning: ignoring return value of ‘read’, declared with attribute warn_unused_result [-Wunused-result]
 5745 |    read(fh, buf, length);
      |    ^~~~~~~~~~~~~~~~~~~~~
src/elogd.c: In function ‘is_ascii’:
src/elogd.c:5783:4: warning: ignoring return value of ‘read’, declared with attribute warn_unused_result [-Wunused-result]
 5783 |    read(fh, buf, length);
      |    ^~~~~~~~~~~~~~~~~~~~~
src/elogd.c: In function ‘show_html_header’:
src/elogd.c:7582:10: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]
 7582 |          fread(buf, 1, size, f);
      |          ^~~~~~~~~~~~~~~~~~~~~~
src/elogd.c: In function ‘show_top_text’:
src/elogd.c:8168:10: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]
 8168 |          fread(buf, 1, size, f);
      |          ^~~~~~~~~~~~~~~~~~~~~~
src/elogd.c: In function ‘show_bottom_text’:
src/elogd.c:8206:13: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]
 8206 |             fread(buf, 1, size, f);
      |             ^~~~~~~~~~~~~~~~~~~~~~
src/elogd.c: In function ‘show_bottom_text_login’:
src/elogd.c:8255:13: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]
 8255 |             fread(buf, 1, size, f);
      |             ^~~~~~~~~~~~~~~~~~~~~~
src/elogd.c: In function ‘send_file_direct’:
src/elogd.c:8411:4: warning: ignoring return value of ‘getcwd’, declared with attribute warn_unused_result [-Wunused-result]
 8411 |    getcwd(dir, sizeof(dir));
      |    ^~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:8479:7: warning: ignoring return value of ‘read’, declared with attribute warn_unused_result [-Wunused-result]
 8479 |       read(fh, return_buffer + strlen(return_buffer), length);
      |       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c: In function ‘show_edit_form’:
src/elogd.c:11673:16: warning: ignoring return value of ‘read’, declared with attribute warn_unused_result [-Wunused-result]
11673 |                read(fh, buffer, length);
      |                ^~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:12003:34: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Wunused-result]
12003 |                                  fgets(str, sizeof(str), f);
      |                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c: In function ‘load_config_section’:
src/elogd.c:12600:4: warning: ignoring return value of ‘read’, declared with attribute warn_unused_result [-Wunused-result]
12600 |    read(fh, *buffer, length);
      |    ^~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c: In function ‘save_admin_config’:
src/elogd.c:12832:4: warning: ignoring return value of ‘read’, declared with attribute warn_unused_result [-Wunused-result]
12832 |    read(fh, buf, length);
      |    ^~~~~~~~~~~~~~~~~~~~~
In file included from src/elogd.c:38:
src/elogd.h:162:22: warning: ignoring return value of ‘ftruncate’, declared with attribute warn_unused_result [-Wunused-result]
  162 | #define TRUNCATE(fh) ftruncate(fh, TELL(fh))
      |                      ^~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:12868:4: note: in expansion of macro ‘TRUNCATE’
12868 |    TRUNCATE(fh);
      |    ^~~~~~~~
src/elogd.c: In function ‘change_config_line’:
src/elogd.c:12900:4: warning: ignoring return value of ‘read’, declared with attribute warn_unused_result [-Wunused-result]
12900 |    read(fh, buf, length);
      |    ^~~~~~~~~~~~~~~~~~~~~
In file included from src/elogd.c:38:
src/elogd.h:162:22: warning: ignoring return value of ‘ftruncate’, declared with attribute warn_unused_result [-Wunused-result]
  162 | #define TRUNCATE(fh) ftruncate(fh, TELL(fh))
      |                      ^~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:12980:4: note: in expansion of macro ‘TRUNCATE’
12980 |    TRUNCATE(fh);
      |    ^~~~~~~~
src/elogd.c: In function ‘delete_logbook’:
src/elogd.c:13014:4: warning: ignoring return value of ‘read’, declared with attribute warn_unused_result [-Wunused-result]
13014 |    read(fh, buf, length);
      |    ^~~~~~~~~~~~~~~~~~~~~
In file included from src/elogd.c:38:
src/elogd.h:162:22: warning: ignoring return value of ‘ftruncate’, declared with attribute warn_unused_result [-Wunused-result]
  162 | #define TRUNCATE(fh) ftruncate(fh, TELL(fh))
      |                      ^~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:13038:4: note: in expansion of macro ‘TRUNCATE’
13038 |    TRUNCATE(fh);
      |    ^~~~~~~~
src/elogd.c: In function ‘rename_logbook’:
src/elogd.c:13085:4: warning: ignoring return value of ‘read’, declared with attribute warn_unused_result [-Wunused-result]
13085 |    read(fh, buf, length);
      |    ^~~~~~~~~~~~~~~~~~~~~
In file included from src/elogd.c:38:
src/elogd.h:162:22: warning: ignoring return value of ‘ftruncate’, declared with attribute warn_unused_result [-Wunused-result]
  162 | #define TRUNCATE(fh) ftruncate(fh, TELL(fh))
      |                      ^~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:13122:4: note: in expansion of macro ‘TRUNCATE’
13122 |    TRUNCATE(fh);
      |    ^~~~~~~~
src/elogd.c: In function ‘create_logbook’:
src/elogd.c:13157:4: warning: ignoring return value of ‘read’, declared with attribute warn_unused_result [-Wunused-result]
13157 |    read(fh, buf, length);
      |    ^~~~~~~~~~~~~~~~~~~~~
In file included from src/elogd.c:38:
src/elogd.h:162:22: warning: ignoring return value of ‘ftruncate’, declared with attribute warn_unused_result [-Wunused-result]
  162 | #define TRUNCATE(fh) ftruncate(fh, TELL(fh))
      |                      ^~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:13214:4: note: in expansion of macro ‘TRUNCATE’
13214 |    TRUNCATE(fh);
      |    ^~~~~~~~
src/elogd.c: In function ‘save_config’:
src/elogd.h:162:22: warning: ignoring return value of ‘ftruncate’, declared with attribute warn_unused_result [-Wunused-result]
  162 | #define TRUNCATE(fh) ftruncate(fh, TELL(fh))
      |                      ^~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:13255:4: note: in expansion of macro ‘TRUNCATE’
13255 |    TRUNCATE(fh);
      |    ^~~~~~~~
src/elogd.c: In function ‘submit_message’:
src/elogd.c:15884:13: warning: ignoring return value of ‘read’, declared with attribute warn_unused_result [-Wunused-result]
15884 |             read(fh, buffer, size);
      |             ^~~~~~~~~~~~~~~~~~~~~~
src/elogd.c: In function ‘receive_config’:
src/elogd.c:16349:10: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Wunused-result]
16349 |          fgets(pwd, sizeof(pwd), stdin);
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c: In function ‘adjust_config’:
src/elogd.c:16411:4: warning: ignoring return value of ‘read’, declared with attribute warn_unused_result [-Wunused-result]
16411 |    read(fh, buf, length);
      |    ^~~~~~~~~~~~~~~~~~~~~
In file included from src/elogd.c:38:
src/elogd.h:162:22: warning: ignoring return value of ‘ftruncate’, declared with attribute warn_unused_result [-Wunused-result]
  162 | #define TRUNCATE(fh) ftruncate(fh, TELL(fh))
      |                      ^~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:16473:4: note: in expansion of macro ‘TRUNCATE’
16473 |    TRUNCATE(fh);
      |    ^~~~~~~~
src/elogd.c: In function ‘receive_pwdfile’:
src/elogd.c:16556:10: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Wunused-result]
16556 |          fgets(str, sizeof(str), stdin);
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/elogd.c:38:
src/elogd.h:162:22: warning: ignoring return value of ‘ftruncate’, declared with attribute warn_unused_result [-Wunused-result]
  162 | #define TRUNCATE(fh) ftruncate(fh, TELL(fh))
      |                      ^~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:16597:4: note: in expansion of macro ‘TRUNCATE’
...
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:16733:33: warning: ‘%s’ directive writing up to 1999 bytes into a region of size 992 [-Wformat-overflow=]
16733 |          sprintf(line, "MIRROR: %s", str);
      |                                 ^~
......
17143 |                   mprint(lbs, mode, str);
      |                                     ~~~
In file included from /usr/include/stdio.h:867,
                 from src/elogd.h:42,
                 from src/elogd.c:38:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 9 and 2008 bytes into a 
destination of size 1000
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:16733:33: warning: ‘%s’ directive writing up to 1999 bytes into a region of size 992 [-Wformat-overflow=]
16733 |          sprintf(line, "MIRROR: %s", str);
      |                                 ^~
......
17244 |                mprint(lbs, mode, str);
      |                                  ~~~
In file included from /usr/include/stdio.h:867,
                 from src/elogd.h:42,
                 from src/elogd.c:38:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 9 and 2008 bytes into a 
destination of size 1000
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:16733:33: warning: ‘%s’ directive writing up to 1999 bytes into a region of size 992 [-Wformat-overflow=]
16733 |          sprintf(line, "MIRROR: %s", str);
      |                                 ^~
......
17241 |                mprint(lbs, mode, str);
      |                                  ~~~
In file included from /usr/include/stdio.h:867,
                 from src/elogd.h:42,
                 from src/elogd.c:38:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 9 and 2008 bytes into a 
destination of size 1000
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:16733:33: warning: ‘%s’ directive writing up to 1999 bytes into a region of size 992 [-Wformat-overflow=]
16733 |          sprintf(line, "MIRROR: %s", str);
      |                                 ^~
......
17296 |                mprint(lbs, mode, str);
      |                                  ~~~
In file included from /usr/include/stdio.h:867,
                 from src/elogd.h:42,
                 from src/elogd.c:38:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 9 and 2008 bytes into a 
destination of size 1000
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:16733:33: warning: ‘%s’ directive writing up to 1999 bytes into a region of size 992 [-Wformat-overflow=]
16733 |          sprintf(line, "MIRROR: %s", str);
      |                                 ^~
......
17289 |                mprint(lbs, mode, str);
      |                                  ~~~
In file included from /usr/include/stdio.h:867,
                 from src/elogd.h:42,
                 from src/elogd.c:38:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 9 and 2008 bytes into a 
destination of size 1000
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:16733:33: warning: ‘%s’ directive writing up to 1999 bytes into a region of size 992 [-Wformat-overflow=]
16733 |          sprintf(line, "MIRROR: %s", str);
      |                                 ^~
......
16952 |             mprint(lbs, mode, str);
      |                               ~~~
In file included from /usr/include/stdio.h:867,
                 from src/elogd.h:42,
                 from src/elogd.c:38:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 9 and 2008 bytes into a 
destination of size 1000
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:17409:60: warning: ‘%s’ directive writing up to 1999 bytes into a region of size 240 [-Wformat-overflow=]
17409 |                         sprintf(rem_ref, "<a href=\"http://%s%d\">%s</a>", str, message_id,
      |                                                            ^~              ~~~
In file included from /usr/include/stdio.h:867,
                 from src/elogd.h:42,
                 from src/elogd.c:38:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output 24 or more bytes (assuming 2023) into a 
destination of size 256
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:16733:33: warning: ‘%s’ directive writing up to 1999 bytes into a region of size 992 [-Wformat-overflow=]
16733 |          sprintf(line, "MIRROR: %s", str);
      |                                 ^~
......
17397 |                         mprint(lbs, mode, str);
      |                                           ~~~
In file included from /usr/include/stdio.h:867,
                 from src/elogd.h:42,
                 from src/elogd.c:38:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 9 and 2008 bytes into a 
destination of size 1000
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:16733:33: warning: ‘%s’ directive writing up to 1999 bytes into a region of size 992 [-Wformat-overflow=]
16733 |          sprintf(line, "MIRROR: %s", str);
      |                                 ^~
......
17381 |                            mprint(lbs, mode, str);
      |                                              ~~~
In file included from /usr/include/stdio.h:867,
                 from src/elogd.h:42,
                 from src/elogd.c:38:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 9 and 2008 bytes into a 
destination of size 1000
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:16733:33: warning: ‘%s’ directive writing up to 1999 bytes into a region of size 992 [-Wformat-overflow=]
16733 |          sprintf(line, "MIRROR: %s", str);
      |                                 ^~
......
17354 |                      mprint(lbs, mode, str);
      |                                        ~~~
In file included from /usr/include/stdio.h:867,
                 from src/elogd.h:42,
                 from src/elogd.c:38:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 9 and 2008 bytes into a 
destination of size 1000
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:16733:33: warning: ‘%s’ directive writing up to 1999 bytes into a region of size 992 [-Wformat-overflow=]
16733 |          sprintf(line, "MIRROR: %s", str);
      |                                 ^~
......
17350 |                         mprint(lbs, mode, str);
      |                                           ~~~
In file included from /usr/include/stdio.h:867,
                 from src/elogd.h:42,
                 from src/elogd.c:38:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 9 and 2008 bytes into a 
destination of size 1000
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:16733:33: warning: ‘%s’ directive writing up to 1999 bytes into a region of size 992 [-Wformat-overflow=]
16733 |          sprintf(line, "MIRROR: %s", str);
      |                                 ^~
......
17343 |                         mprint(lbs, mode, str);
      |                                           ~~~
In file included from /usr/include/stdio.h:867,
                 from src/elogd.h:42,
                 from src/elogd.c:38:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 9 and 2008 bytes into a 
destination of size 1000
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c: In function ‘retrieve_email_from’:
src/elogd.c:3486:44: warning: ‘%s’ directive writing up to 255 bytes into a region of size 245 [-Wformat-overflow=]
 3486 |       sprintf(email_from_name, "ELog <ELog@%s>", host_name);
      |                                            ^~    ~~~~~~~~~
In file included from /usr/include/stdio.h:867,
                 from src/elogd.h:42,
                 from src/elogd.c:38:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 13 and 268 bytes into a 
destination of size 256
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:3487:34: warning: ‘%s’ directive writing up to 255 bytes into a region of size 250 [-Wformat-overflow=]
 3487 |       sprintf(email_from, "<ELog@%s>", host_name);
      |                                  ^~    ~~~~~~~~~
In file included from /usr/include/stdio.h:867,
                 from src/elogd.h:42,
                 from src/elogd.c:38:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 8 and 263 bytes into a destination 
of size 256
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:3508:38: warning: ‘ <’ directive writing 2 bytes into a region of size between 1 and 256 [-Wformat-overflow=]
 3508 |          sprintf(email_from_name, "%s <%s>", login_name, email_from);
      |                                      ^~
In file included from /usr/include/stdio.h:867,
                 from src/elogd.h:42,
                 from src/elogd.c:38:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 4 and 514 bytes into a destination 
of size 256
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c: In function ‘save_user_config’:
src/elogd.c:13477:40: warning: ‘%s’ directive writing up to 255 bytes into a region of size 249 [-Wformat-overflow=]
13477 |                   sprintf(url, "http://%s:%d/", http_host, elog_tcp_port);
      |                                        ^~       ~~~~~~~~~
In file included from /usr/include/stdio.h:867,
                 from src/elogd.h:42,
                 from src/elogd.c:38:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 11 and 276 bytes into a 
destination of size 256
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:13475:41: warning: ‘%s’ directive writing up to 255 bytes into a region of size 248 [-Wformat-overflow=]
13475 |                   sprintf(url, "https://%s:%d/", http_host, elog_tcp_port);
      |                                         ^~       ~~~~~~~~~
In file included from /usr/include/stdio.h:867,
                 from src/elogd.h:42,
                 from src/elogd.c:38:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 12 and 277 bytes into a 
destination of size 256
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:13472:40: warning: ‘%s’ directive writing up to 255 bytes into a region of size 249 [-Wformat-overflow=]
13472 |                   sprintf(url, "http://%s/", http_host);
      |                                        ^~    ~~~~~~~~~
In file included from /usr/include/stdio.h:867,
                 from src/elogd.h:42,
                 from src/elogd.c:38:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 9 and 264 bytes into a destination 
of size 256
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:13470:41: warning: ‘%s’ directive writing up to 255 bytes into a region of size 248 [-Wformat-overflow=]
13470 |                   sprintf(url, "https://%s/", http_host);
      |                                         ^~    ~~~~~~~~~
In file included from /usr/include/stdio.h:867,
                 from src/elogd.h:42,
                 from src/elogd.c:38:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 10 and 265 bytes into a 
destination of size 256
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c: In function ‘activate_user’:
src/elogd.c:14059:40: warning: ‘%s’ directive writing up to 255 bytes into a region of size 249 [-Wformat-overflow=]
14059 |                   sprintf(url, "http://%s:%d/", http_host, elog_tcp_port);
      |                                        ^~       ~~~~~~~~~
In file included from /usr/include/stdio.h:867,
                 from src/elogd.h:42,
                 from src/elogd.c:38:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 11 and 276 bytes into a 
destination of size 256
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:14057:41: warning: ‘%s’ directive writing up to 255 bytes into a region of size 248 [-Wformat-overflow=]
14057 |                   sprintf(url, "https://%s:%d/", http_host, elog_tcp_port);
      |                                         ^~       ~~~~~~~~~
In file included from /usr/include/stdio.h:867,
                 from src/elogd.h:42,
                 from src/elogd.c:38:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 12 and 277 bytes into a 
destination of size 256
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:14054:40: warning: ‘%s’ directive writing up to 255 bytes into a region of size 249 [-Wformat-overflow=]
14054 |                   sprintf(url, "http://%s/", http_host);
      |                                        ^~    ~~~~~~~~~
In file included from /usr/include/stdio.h:867,
                 from src/elogd.h:42,
                 from src/elogd.c:38:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 9 and 264 bytes into a destination 
of size 256
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:14052:41: warning: ‘%s’ directive writing up to 255 bytes into a region of size 248 [-Wformat-overflow=]
14052 |                   sprintf(url, "https://%s/", http_host);
      |                                         ^~    ~~~~~~~~~
In file included from /usr/include/stdio.h:867,
                 from src/elogd.h:42,
                 from src/elogd.c:38:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 10 and 265 bytes into a 
destination of size 256
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c: In function ‘show_forgot_pwd_page’:
src/elogd.c:14168:44: warning: ‘%s’ directive writing up to 255 bytes into a region of size 228 [-Wformat-overflow=]
14168 |             sprintf(redir, "?cmd=%s&oldpwd=%s", loc("Change password"), pwd);
      |                                            ^~                           ~~~
In file included from /usr/include/stdio.h:867,
                 from src/elogd.h:42,
                 from src/elogd.c:38:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 29 and 284 bytes into a 
destination of size 256
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:14172:34: warning: ‘%s’ directive writing up to 999 bytes into a region of size 993 [-Wformat-overflow=]
14172 |             sprintf(str, "?redir=%s&uname=%s&upassword=%s", str2, login_name, pwd);
      |                                  ^~                         ~~~~
In file included from /usr/include/stdio.h:867,
                 from src/elogd.h:42,
                 from src/elogd.c:38:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 26 and 1535 bytes into a 
destination of size 1000
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:14168:44: warning: ‘%s’ directive writing up to 255 bytes into a region of size 228 [-Wformat-overflow=]
14168 |             sprintf(redir, "?cmd=%s&oldpwd=%s", loc("Change password"), pwd);
      |                                            ^~                           ~~~
In file included from /usr/include/stdio.h:867,
                 from src/elogd.h:42,
                 from src/elogd.c:38:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 29 and 284 bytes into a 
destination of size 256
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:14172:34: warning: ‘%s’ directive writing up to 999 bytes into a region of size 993 [-Wformat-overflow=]
14172 |             sprintf(str, "?redir=%s&uname=%s&upassword=%s", str2, login_name, pwd);
      |                                  ^~                         ~~~~
In file included from /usr/include/stdio.h:867,
                 from src/elogd.h:42,
                 from src/elogd.c:38:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 26 and 1535 bytes into a 
destination of size 1000
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:14168:44: warning: ‘%s’ directive writing up to 255 bytes into a region of size between 228 and 243 [-Wformat-overflow=]
14168 |             sprintf(redir, "?cmd=%s&oldpwd=%s", loc("Change password"), pwd);
      |                                            ^~                           ~~~
In file included from /usr/include/stdio.h:867,
                 from src/elogd.h:42,
                 from src/elogd.c:38:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output 14 or more bytes (assuming 284) into a 
destination of size 256
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:14172:34: warning: ‘%s’ directive writing up to 999 bytes into a region of size 993 [-Wformat-overflow=]
14172 |             sprintf(str, "?redir=%s&uname=%s&upassword=%s", str2, login_name, pwd);
      |                                  ^~                         ~~~~
In file included from /usr/include/stdio.h:867,
                 from src/elogd.h:42,
                 from src/elogd.c:38:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 26 and 1535 bytes into a 
destination of size 1000
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c: In function ‘show_change_pwd_page’:
src/elogd.c:8918:53: warning: ‘%s’ directive writing up to 255 bytes into a region of size between 222 and 237 [-Wformat-overflow=]
 8918 |                sprintf(str, "?cmd=%s&config=%s&fail=%s", loc("Change password"), getparam("unm"), error_str);
      |                                                     ^~                                            ~~~~~~~~~
In file included from /usr/include/stdio.h:867,
                 from src/elogd.h:42,
                 from src/elogd.c:38:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output 20 or more bytes (assuming 290) into a 
destination of size 256
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:8908:47: warning: ‘%s’ directive writing up to 255 bytes into a region of size 241 [-Wformat-overflow=]
 8908 |                sprintf(str, "?cmd=%s&cfg_user=%s", loc("Config"), config);
      |                                               ^~                  ~~~~~~
In file included from /usr/include/stdio.h:867,
                 from src/elogd.h:42,
                 from src/elogd.c:38:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output 16 or more bytes (assuming 271) into a 
destination of size 256
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c: In function ‘show_edit_form’:
src/elogd.c:10602:28: warning: ‘%s’ directive writing up to 149999 bytes into a region of size 2993 [-Wformat-overflow=]
10602 |       sprintf(str, "Format %s", attr_list[i]);
      |                            ^~
In file included from /usr/include/stdio.h:867,
                 from src/elogd.h:42,
                 from src/elogd.c:38:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 8 and 150007 bytes into a 
destination of size 3000
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:10674:35: warning: ‘%s’ directive writing up to 9999 bytes into a region of size 248 [-Wformat-overflow=]
10674 |          sprintf(title, " title=\"%s\"", comment);
      |                                   ^~     ~~~~~~~
In file included from /usr/include/stdio.h:867,
                 from src/elogd.h:42,
                 from src/elogd.c:38:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 10 and 10009 bytes into a 
destination of size 256
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:11142:52: warning: ‘%s’ directive writing up to 9999 bytes into a region of size 9992 [-Wformat-overflow=]
11142 |                         sprintf(tooltip, " title=\"%s\"", comment);
      |                                                    ^~     ~~~~~~~
In file included from /usr/include/stdio.h:867,
                 from src/elogd.h:42,
                 from src/elogd.c:38:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 10 and 10009 bytes into a 
destination of size 10000
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:11091:52: warning: ‘%s’ directive writing up to 9999 bytes into a region of size 9992 [-Wformat-overflow=]
11091 |                         sprintf(tooltip, " title=\"%s\"", comment);
      |                                                    ^~     ~~~~~~~
In file included from /usr/include/stdio.h:867,
                 from src/elogd.h:42,
                 from src/elogd.c:38:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 10 and 10009 bytes into a 
destination of size 10000
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:11096:52: warning: ‘%s’ directive writing up to 9999 bytes into a region of size 9992 [-Wformat-overflow=]
11096 |                         sprintf(tooltip, " title=\"%s\"", comment);
      |                                                    ^~     ~~~~~~~
In file included from /usr/include/stdio.h:867,
                 from src/elogd.h:42,
                 from src/elogd.c:38:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 10 and 10009 bytes into a 
destination of size 10000
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:11892:56: warning: ‘%s’ directive writing up to 12799 bytes into a region of size between 2727 and 2983 [-Wformat-
overflow=]
11892 |                      sprintf(str, "im('att'+'%d','%s','%s','smaller');", index, thumb_name, att[index]);
      |                                                        ^~
In file included from /usr/include/stdio.h:867,
                 from src/elogd.h:42,
                 from src/elogd.c:38:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 31 and 13086 bytes into a 
destination of size 3000
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:11894:56: warning: ‘%s’ directive writing up to 12799 bytes into a region of size between 2727 and 2983 [-Wformat-
overflow=]
11894 |                      sprintf(str, "im('att'+'%d','%s','%s','original');", index, thumb_name, att[index]);
      |                                                        ^~
In file included from /usr/include/stdio.h:867,
                 from src/elogd.h:42,
                 from src/elogd.c:38:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 32 and 13087 bytes into a 
destination of size 3000
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:11896:56: warning: ‘%s’ directive writing up to 12799 bytes into a region of size between 2727 and 2983 [-Wformat-
overflow=]
11896 |                      sprintf(str, "im('att'+'%d','%s','%s','larger');", index, thumb_name, att[index]);
      |                                                        ^~
In file included from /usr/include/stdio.h:867,
                 from src/elogd.h:42,
                 from src/elogd.c:38:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 30 and 13085 bytes into a 
destination of size 3000
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:11899:56: warning: ‘%s’ directive writing up to 12799 bytes into a region of size between 2727 and 2983 [-Wformat-
overflow=]
11899 |                      sprintf(str, "im('att'+'%d','%s','%s','rotleft');", index, thumb_name, att[index]);
      |                                                        ^~
In file included from /usr/include/stdio.h:867,
                 from src/elogd.h:42,
                 from src/elogd.c:38:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 31 and 13086 bytes into a 
destination of size 3000
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:11901:56: warning: ‘%s’ directive writing up to 12799 bytes into a region of size between 2727 and 2983 [-Wformat-
overflow=]
11901 |                      sprintf(str, "im('att'+'%d','%s','%s','rotright');", index, thumb_name, att[index]);
      |                                                        ^~
In file included from /usr/include/stdio.h:867,
                 from src/elogd.h:42,
                 from src/elogd.c:38:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 32 and 13087 bytes into a 
destination of size 3000
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:11915:41: warning: ‘ -format '’ directive writing 10 bytes into a region of size between 1 and 256 [-Wformat-overflow=]
11915 |                         sprintf(cmd, "%s -format '%%wx%%h' '%s'", _identify_cmd, file_name);
      |                                         ^~~~~~~~~~
In file included from /usr/include/stdio.h:867,
                 from src/elogd.h:42,
                 from src/elogd.c:38:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 20 and 530 bytes into a 
destination of size 256
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:11913:41: warning: ‘ -format '’ directive writing 10 bytes into a region of size between 1 and 256 [-Wformat-overflow=]
11913 |                         sprintf(cmd, "%s -format '%%wx%%h' '%s[0]'", _identify_cmd, file_name);
      |                                         ^~~~~~~~~~
In file included from /usr/include/stdio.h:867,
                 from src/elogd.h:42,
                 from src/elogd.c:38:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 23 and 533 bytes into a 
destination of size 256
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:11982:42: warning: ‘%s’ directive writing up to 2999 bytes into a region of size 256 [-Wformat-overflow=]
11982 |                            sprintf(ref, "%s/%s", str, file_enc);
      |                                          ^~      ~~~
In file included from /usr/include/stdio.h:867,
                 from src/elogd.h:42,
                 from src/elogd.c:38:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 2 and 3256 bytes into a 
destination of size 256
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:11967:48: warning: ‘%s’ directive writing up to 2999 bytes into a region of size 256 [-Wformat-overflow=]
11967 |                                  sprintf(ref, "%s/%s?thumb=1", str, file_enc);
      |                                                ^~              ~~~
In file included from /usr/include/stdio.h:867,
                 from src/elogd.h:42,
                 from src/elogd.c:38:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 10 and 3264 bytes into a 
destination of size 256
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:11949:42: warning: ‘%s’ directive writing up to 2999 bytes into a region of size 256 [-Wformat-overflow=]
11949 |                            sprintf(ref, "%s/%s?thumb=1", str, file_enc);
      |                                          ^~              ~~~
In file included from /usr/include/stdio.h:867,
                 from src/elogd.h:42,
                 from src/elogd.c:38:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 10 and 3264 bytes into a 
destination of size 256
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c: In function ‘show_elog_list’:
src/elogd.c:20037:27: warning: ‘%s’ directive writing up to 149999 bytes into a region of size 253 [-Wformat-overflow=]
20037 |          sprintf(ref, "-- %s --", attr_list[i]);
      |                           ^~
In file included from /usr/include/stdio.h:867,
                 from src/elogd.h:42,
                 from src/elogd.c:38:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 7 and 150006 bytes into a 
destination of size 256
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:20121:39: warning: ‘%s’ directive writing up to 79 bytes into a region of size 73 [-Wformat-overflow=]
20121 |          sprintf(mode_cookie, "elmode=%s", mode);
      |                                       ^~   ~~~~
In file included from /usr/include/stdio.h:867,
                 from src/elogd.h:42,
                 from src/elogd.c:38:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 8 and 87 bytes into a destination 
of size 80
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:20354:27: warning: ‘%s’ directive writing up to 149999 bytes into a region of size 1500 [-Wformat-overflow=]
20354 |             sprintf(str, "%s_%d", attr_list[i], j);
      |                           ^~
In file included from /usr/include/stdio.h:867,
                 from src/elogd.h:42,
                 from src/elogd.c:38:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 3 and 150012 bytes into a 
destination of size 1500
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:20364:27: warning: ‘%s’ directive writing up to 149999 bytes into a region of size 1500 [-Wformat-overflow=]
20364 |             sprintf(str, "%s_%d", attr_list[i], j);
      |                           ^~
In file included from /usr/include/stdio.h:867,
                 from src/elogd.h:42,
                 from src/elogd.c:38:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 3 and 150012 bytes into a 
destination of size 1500
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:21243:35: warning: ‘%s’ directive writing up to 149999 bytes into a region of size 256 [-Wformat-overflow=]
21243 |                   sprintf(iattr, "%s_%d", attr_list[i], j);
      |                                   ^~
In file included from /usr/include/stdio.h:867,
                 from src/elogd.h:42,
                 from src/elogd.c:38:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 3 and 150012 bytes into a 
destination of size 256
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:21182:35: warning: ‘%s’ directive writing up to 149999 bytes into a region of size 256 [-Wformat-overflow=]
21182 |                   sprintf(iattr, "%s_%d", attr_list[i], j);
      |                                   ^~
In file included from /usr/include/stdio.h:867,
                 from src/elogd.h:42,
                 from src/elogd.c:38:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 3 and 150012 bytes into a 
destination of size 256
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:21454:43: warning: ‘%s’ directive writing up to 1499 bytes into a region of size 249 [-Wformat-overflow=]
21454 |                      sprintf(ref, "?rsort=%s", str);
      |                                           ^~   ~~~
In file included from /usr/include/stdio.h:867,
                 from src/elogd.h:42,
                 from src/elogd.c:38:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 8 and 1507 bytes into a 
destination of size 256
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:21456:42: warning: ‘%s’ directive writing up to 1499 bytes into a region of size 250 [-Wformat-overflow=]
21456 |                      sprintf(ref, "?sort=%s", str);
      |                                          ^~   ~~~
In file included from /usr/include/stdio.h:867,
                 from src/elogd.h:42,
                 from src/elogd.c:38:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 7 and 1506 bytes into a 
destination of size 256
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:21470:35: warning: ‘%s’ directive writing up to 155999 bytes into a region of size 1492 [-Wformat-overflow=]
21470 |             sprintf(str, "Tooltip %s", disp_attr[i]);
      |                                   ^~
In file included from /usr/include/stdio.h:867,
                 from src/elogd.h:42,
                 from src/elogd.c:38:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 9 and 156008 bytes into a 
destination of size 1500
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:21472:38: warning: ‘%s’ directive writing up to 1499 bytes into a region of size 1493 [-Wformat-overflow=]
21472 |                sprintf(str, "title=\"%s\"", comment);
      |                                      ^~     ~~~~~~~
In file included from /usr/include/stdio.h:867,
                 from src/elogd.h:42,
                 from src/elogd.c:38:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 9 and 1508 bytes into a 
destination of size 1500
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:21646:42: warning: ‘%s’ directive writing up to 149999 bytes into a region of size 1488 [-Wformat-overflow=]
21646 |                sprintf(str, "Time format %s", attr_list[i]);
      |                                          ^~
In file included from /usr/include/stdio.h:867,
                 from src/elogd.h:42,
                 from src/elogd.c:38:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 13 and 150012 bytes into a 
destination of size 1500
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:21630:42: warning: ‘%s’ directive writing up to 149999 bytes into a region of size 1488 [-Wformat-overflow=]
21630 |                sprintf(str, "Date format %s", attr_list[i]);
      |                                          ^~
In file included from /usr/include/stdio.h:867,
                 from src/elogd.h:42,
                 from src/elogd.c:38:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 13 and 150012 bytes into a 
destination of size 1500
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:19968:31: warning: ‘3D’ directive writing 2 bytes into a region of size between 0 and 1499 [-Wformat-overflow=]
19968 |             sprintf(str, "%s%%3D", param);
      |                               ^~
In file included from /usr/include/stdio.h:867,
                 from src/elogd.h:42,
                 from src/elogd.c:38:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 4 and 1503 bytes into a 
destination of size 1500
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:19945:31: warning: ‘3D’ directive writing 2 bytes into a region of size between 0 and 1499 [-Wformat-overflow=]
19945 |             sprintf(str, "%s%%3D", param);
      |                               ^~
In file included from /usr/include/stdio.h:867,
                 from src/elogd.h:42,
                 from src/elogd.c:38:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 4 and 1503 bytes into a 
destination of size 1500
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c: In function ‘show_elog_entry’:
src/elogd.c:25162:33: warning: ‘%s’ directive writing up to 2999 bytes into a region of size 256 [-Wformat-overflow=]
25162 |                   sprintf(ref, "%s/%s", str, file_enc);
      |                                 ^~      ~~~
In file included from /usr/include/stdio.h:867,
                 from src/elogd.h:42,
                 from src/elogd.c:38:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 2 and 3256 bytes into a 
destination of size 256
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:25156:43: warning: ‘%s’ directive writing up to 255 bytes into a region of size between 246 and 247 [-Wformat-overflow=]
25156 |                   sprintf(ref, "cid:att%d@%s", index, domain);
      |                                           ^~          ~~~~~~
In file included from /usr/include/stdio.h:867,
                 from src/elogd.h:42,
                 from src/elogd.c:38:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 10 and 266 bytes into a 
destination of size 256
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c: In function ‘compose_email’:
src/elogd.c:22504:18: warning: ‘%s’ directive writing up to 1599 bytes into a region of size 256 [-Wformat-overflow=]
22504 |    sprintf(url, "%s%d", str, message_id);
      |                  ^~     ~~~
In file included from /usr/include/stdio.h:867,
                 from src/elogd.h:42,
                 from src/elogd.c:38:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 2 and 1611 bytes into a 
destination of size 256
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c: In function ‘submit_elog’:
src/elogd.c:22983:33: warning: ‘%d’ directive writing between 1 and 2 bytes into a region of size between 0 and 1499 [-Wformat-
overflow=]
22983 |                sprintf(str, "%s_%d", ua, j);
      |                                 ^~
src/elogd.c:22983:29: note: directive argument in the range [0, 99]
22983 |                sprintf(str, "%s_%d", ua, j);
      |                             ^~~~~~~
In file included from /usr/include/stdio.h:867,
                 from src/elogd.h:42,
                 from src/elogd.c:38:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 3 and 1503 bytes into a 
destination of size 1500
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:23144:33: warning: ‘%d’ directive writing between 1 and 2 bytes into a region of size between 0 and 1499 [-Wformat-
overflow=]
23144 |                sprintf(str, "%s_%d", ua, j);
      |                                 ^~
src/elogd.c:23144:29: note: directive argument in the range [0, 99]
23144 |                sprintf(str, "%s_%d", ua, j);
      |                             ^~~~~~~
In file included from /usr/include/stdio.h:867,
                 from src/elogd.h:42,
                 from src/elogd.c:38:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 3 and 1503 bytes into a 
destination of size 1500
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:23275:30: warning: ‘%s’ directive writing up to 149999 bytes into a region of size 1494 [-Wformat-overflow=]
23275 |          sprintf(str, "Subst %s", attr_list[index]);
      |                              ^~
In file included from /usr/include/stdio.h:867,
                 from src/elogd.h:42,
                 from src/elogd.c:38:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 7 and 150006 bytes into a 
destination of size 1500
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:23523:34: warning: ‘%d’ directive writing between 1 and 10 bytes into a region of size between 0 and 1499 [-Wformat-
overflow=]
23523 |                sprintf(str2, "%s_%d", ua, mindex);
      |                                  ^~
src/elogd.c:23523:30: note: directive argument in the range [0, 2147483647]
23523 |                sprintf(str2, "%s_%d", ua, mindex);
      |                              ^~~~~~~
In file included from /usr/include/stdio.h:867,
                 from src/elogd.h:42,
                 from src/elogd.c:38:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 3 and 1511 bytes into a 
destination of size 1500
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c: In function ‘do_self_register’:
src/elogd.c:26778:27: warning: ‘%s’ directive writing up to 255 bytes into a region of size 253 [-Wformat-overflow=]
26778 |          sprintf(str, "../%s/", lbs->name_enc);
      |                           ^~
In file included from /usr/include/stdio.h:867,
                 from src/elogd.h:42,
                 from src/elogd.c:38:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 5 and 260 bytes into a destination 
of size 256
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c: In function ‘show_uploader_finished’:
src/elogd.c:27015:24: warning: ‘%s’ directive writing up to 255 bytes into a region of size between 0 and 255 [-Wformat-overflow=]
27015 |       sprintf(ref, "%s/%s?lb=%s", str, file_enc, lbs->name_enc);
      |                        ^~              ~~~~~~~~
In file included from /usr/include/stdio.h:867,
                 from src/elogd.h:42,
                 from src/elogd.c:38:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 6 and 771 bytes into a destination 
of size 256
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:27016:30: warning: ‘%s’ directive writing up to 255 bytes into a region of size between 0 and 255 [-Wformat-overflow=]
27016 |       sprintf(ref_thumb, "%s/%s?lb=%s&thumb=1", str, file_enc, lbs->name_enc);
      |                              ^~                      ~~~~~~~~
In file included from /usr/include/stdio.h:867,
                 from src/elogd.h:42,
                 from src/elogd.c:38:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 14 and 779 bytes into a 
destination of size 256
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c: In function ‘interprete’:
src/elogd.c:28286:27: warning: ‘%s’ directive writing up to 1499 bytes into a region of size 1495 [-Wformat-overflow=]
28286 |       sprintf(str1, "?cmd=%s", str);
      |                           ^~   ~~~
In file included from /usr/include/stdio.h:867,
                 from src/elogd.h:42,
                 from src/elogd.c:38:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 6 and 1505 bytes into a 
destination of size 1500
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:28290:27: warning: ‘%s’ directive writing up to 1499 bytes into a region of size 1495 [-Wformat-overflow=]
28290 |       sprintf(str2, "?cmd=%s", str);
      |                           ^~   ~~~
In file included from /usr/include/stdio.h:867,
                 from src/elogd.h:42,
                 from src/elogd.c:38:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 6 and 1505 bytes into a 
destination of size 1500
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:28075:31: warning: ‘%s’ directive writing up to 1499 bytes into a region of size 1495 [-Wformat-overflow=]
28075 |          sprintf(str, "%s: <b>%s</b>", loc("Invalid URL"), str2);
      |                               ^~                           ~~~~
In file included from /usr/include/stdio.h:867,
                 from src/elogd.h:42,
                 from src/elogd.c:38:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output 10 or more bytes (assuming 1509) into a 
destination of size 1500
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:27535:28: warning: ‘%s’ directive writing up to 1499 bytes into a region of size 1495 [-Wformat-overflow=]
27535 |       sprintf(str, "%s: <b>%s</b>", loc("Invalid URL"), str2);
      |                            ^~                           ~~~~
In file included from /usr/include/stdio.h:867,
                 from src/elogd.h:42,
                 from src/elogd.c:38:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output 10 or more bytes (assuming 1509) into a 
destination of size 1500
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c: In function ‘decode_post’:
src/elogd.c:28521:54: warning: ‘%s’ directive writing up to 1499 bytes into a region of size 1483 [-Wformat-overflow=]
28521 |                      sprintf(str, "Error: Filename \"%s\" contains invalid character", str2);
      |                                                      ^~                                ~~~~
In file included from /usr/include/stdio.h:867,
                 from src/elogd.h:42,
                 from src/elogd.c:38:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 46 and 1545 bytes into a 
destination of size 1500
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c: At top level:
cc1: warning: unrecognized command line option ‘-Wno-unused-results’
gcc -O3 -funroll-loops -fomit-frame-pointer -W -Wall -Wno-deprecated-declarations -Wno-unused-results -Imxml -DHAVE_SSL -o elconv 
src/elconv.c -lssl
src/elconv.c: In function ‘el_submit’:
src/elconv.c:635:19: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Wunused-result]
  635 |                   write(fh, buffer[index], buffer_size[index]);
      |                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elconv.c:662:7: warning: ignoring return value of ‘read’, declared with attribute warn_unused_result [-Wunused-result]
  662 |       read(fh, str, 16);
      |       ^~~~~~~~~~~~~~~~~
src/elconv.c:664:7: warning: ignoring return value of ‘read’, declared with attribute warn_unused_result [-Wunused-result]
  664 |       read(fh, message, size);
      |       ^~~~~~~~~~~~~~~~~~~~~~~
src/elconv.c:772:4: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Wunused-result]
  772 |    write(fh, start_str, strlen(start_str));
      |    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elconv.c:773:4: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Wunused-result]
  773 |    write(fh, message, strlen(message));
      |    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elconv.c:774:4: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Wunused-result]
  774 |    write(fh, end_str, strlen(end_str));
      |    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elconv.c:786:7: warning: ignoring return value of ‘ftruncate’, declared with attribute warn_unused_result [-Wunused-result]
  786 |       ftruncate(fh, TELL(fh));
      |       ^~~~~~~~~~~~~~~~~~~~~~~
src/elconv.c:801:13: warning: ignoring return value of ‘read’, declared with attribute warn_unused_result [-Wunused-result]
  801 |             read(fh, str, 16);
      |             ^~~~~~~~~~~~~~~~~
src/elconv.c:807:16: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Wunused-result]
  807 |                write(fh, str, 16);
      |                ^~~~~~~~~~~~~~~~~~
src/elconv.c: In function ‘el_get_v1’:
src/elconv.c:881:4: warning: ignoring return value of ‘read’, declared with attribute warn_unused_result [-Wunused-result]
  881 |    read(fh, message, size);
      |    ^~~~~~~~~~~~~~~~~~~~~~~
src/elconv.c: In function ‘scan_messages’:
src/elconv.c:914:4: warning: ignoring return value of ‘getcwd’, declared with attribute warn_unused_result [-Wunused-result]
  914 |    getcwd(str, sizeof(str));
      |    ^~~~~~~~~~~~~~~~~~~~~~~~
src/elconv.c:1003:7: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Wunused-result]
 1003 |       write(fh, str, strlen(str));
      |       ^~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elconv.c:1014:13: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Wunused-result]
 1014 |             write(fh, str, strlen(str));
      |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elconv.c:1026:13: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Wunused-result]
 1026 |             write(fh, str, strlen(str));
      |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elconv.c:1036:7: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Wunused-result]
 1036 |       write(fh, message, strlen(message));
      |       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elconv.c: In function ‘main’:
src/elconv.c:1071:4: warning: ignoring return value of ‘getcwd’, declared with attribute warn_unused_result [-Wunused-result]
 1071 |    getcwd(data_dir, sizeof(data_dir));
      |    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/string.h:495,
                 from src/elconv.c:32:
In function ‘strncpy’,
    inlined from ‘ss_file_find’ at src/elconv.c:233:10:
/usr/include/x86_64-linux-gnu/bits/string_fortified.h:106:10: warning: ‘__builtin_strncpy’ output truncated before terminating nul 
copying as many bytes from a string as 
its length [-Wstringop-truncation]
  106 |   return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest));
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elconv.c: In function ‘ss_file_find’:
src/elconv.c:233:10: note: length computed here
  233 |          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=]
  325 |          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]
  325 |          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]
In file included from /usr/include/stdio.h:867,
                 from src/elconv.c:28:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 11 and 285 bytes into a 
destination of size 256
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elconv.c:419:32: warning: ‘%06d’ directive writing 6 bytes into a region of size between 1 and 256 [-Wformat-overflow=]
  419 |          sprintf(file_name, "%s%06d.log", dir, max % 1000000);
      |                                ^~~~
src/elconv.c:419:29: note: directive argument in the range [0, 999999]
  419 |          sprintf(file_name, "%s%06d.log", dir, max % 1000000);
      |                             ^~~~~~~~~~~~
In file included from /usr/include/stdio.h:867,
                 from src/elconv.c:28:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 11 and 266 bytes into a 
destination of size 256
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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=]
  388 |          sprintf(file_name, "%s%06d.log", dir, min % 1000000);
      |                                ^~~~
src/elconv.c:388:29: note: directive argument in the range [-999999, 999999]
  388 |          sprintf(file_name, "%s%06d.log", dir, min % 1000000);
      |                             ^~~~~~~~~~~~
In file included from /usr/include/stdio.h:867,
                 from src/elconv.c:28:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 11 and 267 bytes into a 
destination of size 256
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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=]
  626 |                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]
  626 |                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]
In file included from /usr/include/stdio.h:867,
                 from src/elconv.c:28:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 15 and 571 bytes into a 
destination of size 256
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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=]
  690 |       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]
  690 |       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]
In file included from /usr/include/stdio.h:867,
                 from src/elconv.c:28:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 11 and 285 bytes into a 
destination of size 256
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elconv.c:656:29: warning: ‘%s’ directive writing up to 255 bytes into a region of size between 1 and 256 [-Wformat-overflow=]
  656 |       sprintf(file_name, "%s%s.log", dir, str);
      |                             ^~            ~~~
In file included from /usr/include/stdio.h:867,
                 from src/elconv.c:28:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 5 and 515 bytes into a destination 
of size 256
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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=]
  981 |       sprintf(file_name, "%s%sa.log", data_dir, str);
      |                             ^~                  ~~~
In file included from /usr/include/stdio.h:867,
                 from src/elconv.c:28:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 6 and 516 bytes into a destination 
of size 256
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elconv.c: At top level:
cc1: warning: unrecognized command line option ‘-Wno-unused-results’
darkside@daq00:~/packages/elog$      
  69468   Tue Feb 8 09:14:25 2022 Reply Stefan Rittstefan.ritt@psi.chBug reportLinuxcb3afcd826d26bfRe: make all messages on ubuntu LTS 20.04.03
> /usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output 2 or more bytes (assuming 4097) into a 
> destination of size 4096

Yeah, I like those warnings "up to 4097 bytes written to a buffer of 4096 bytes". And it's even not a security issue, since the source of the data comes from elogd.cfg which only the owner can modify.

Basically this calls to rewrite elog completely with std::string. Maybe one day I retire and have some time for that...

Stefan
ELOG V3.1.5-3fb85fa6