CSS reference in Email for private logbooks, posted by Andreas Luedeke on Mon Aug 21 14:27:50 2017
|
We operate ELOG in an intranet. Many logbooks do send out emails; several use HTML content formatting.
If I watch HTML formatted emails from the intranet, then everything is fine.
If I try to read them from home, my email client hangs when it tries to read the CSS file from out intranet (URL: https://elog-gfa.psi.ch/SLS/elog.css).
Is there a way to set a URL for the email CSS?
Then I could simply copy the CSS file to the internet accessible location and the emails would be properly formatted in the intranet and from home.
I've tried to use "Use Email URL = ", but it turned out that this will change all base URL's in the email BUT the one in the CSS :-(
So I would need a config "Email CSS URL = " to set this.
Here is a patch that does what I want, but it might have some side-effects I'm not yet aware of:
7636,7643c7636,7638
< if (absolute_link) {
< if (lbs != NULL && getcfg(lbs->name, "Email CSS URL", str, sizeof(str)))
< strlcpy(css_base, str, sizeof(css_base));
< else if (lbs == NULL && getcfg("global", "Email CSS URL", str, sizeof(str)))
< strlcpy(css_base, str, sizeof(css_base));
< if (css_base[0] == 0)
< compose_base_url(lbs, css_base, sizeof(css_base), FALSE);
< } else
---
> if (absolute_link)
> compose_base_url(lbs, css_base, sizeof(css_base), FALSE);
> else
Cheers
Andreas |
Re: CSS reference in Email for private logbooks, posted by Stefan Ritt on Fri Dec 21 14:04:41 2018
|
I changed the code ot include the CSS file directly in the email body. So no need any more for external CSS files. I dropped the "Email CSS URL" option as well.
Stefan
Andreas Luedeke wrote: |
We operate ELOG in an intranet. Many logbooks do send out emails; several use HTML content formatting.
If I watch HTML formatted emails from the intranet, then everything is fine.
If I try to read them from home, my email client hangs when it tries to read the CSS file from out intranet (URL: https://elog-gfa.psi.ch/SLS/elog.css).
Is there a way to set a URL for the email CSS?
Then I could simply copy the CSS file to the internet accessible location and the emails would be properly formatted in the intranet and from home.
I've tried to use "Use Email URL = ", but it turned out that this will change all base URL's in the email BUT the one in the CSS :-(
So I would need a config "Email CSS URL = " to set this.
Here is a patch that does what I want, but it might have some side-effects I'm not yet aware of:
7636,7643c7636,7638
< if (absolute_link) {
< if (lbs != NULL && getcfg(lbs->name, "Email CSS URL", str, sizeof(str)))
< strlcpy(css_base, str, sizeof(css_base));
< else if (lbs == NULL && getcfg("global", "Email CSS URL", str, sizeof(str)))
< strlcpy(css_base, str, sizeof(css_base));
< if (css_base[0] == 0)
< compose_base_url(lbs, css_base, sizeof(css_base), FALSE);
< } else
---
> if (absolute_link)
> compose_base_url(lbs, css_base, sizeof(css_base), FALSE);
> else
Cheers
Andreas
|
|
xmalloc error when filling entries and chaning page, posted by Antonio Iuliano on Wed Dec 12 10:44:57 2018
|
Dear ELOG experts,
the ELOG server on our lab crashes continuosly, when we add a new entry or even if we click the arrows to navigate between entries. Following the FAQ on the website, I have used gdb and found the following error:
xmalloc: not enough memory
[Inferior 1 (process 23271) exited with code 01]
It should be then some allocation issue when we try to access to the entries, but I could not figure the nature of the issue. I was, however, able to reproduce it with a fresh ELOG installation and the same configuration file (ELOG cloned from git and installed today)
Could you please give me any suggestion? I attach here the configuration file we use.
Best regards,
Antonio Iuliano |
Re: xmalloc error when filling entries and chaning page, posted by Stefan Ritt on Fri Dec 21 13:00:50 2018
|
I tried to reproduce the problem but could not. The config file uses "emtpy.html", "filtermenutext.html" and so on which I don't have. Same with eventlocation.
Rather than sending me all the files, can you strip down your elogd.cfg to a minimal version where you still see the problem. Then give me all information to reproduce it. You also have to tell me when the error occurs, like when you submit a new entry, scan through entries etc.
Stefan
Antonio Iuliano wrote: |
Dear ELOG experts,
the ELOG server on our lab crashes continuosly, when we add a new entry or even if we click the arrows to navigate between entries. Following the FAQ on the website, I have used gdb and found the following error:
xmalloc: not enough memory
[Inferior 1 (process 23271) exited with code 01]
It should be then some allocation issue when we try to access to the entries, but I could not figure the nature of the issue. I was, however, able to reproduce it with a fresh ELOG installation and the same configuration file (ELOG cloned from git and installed today)
Could you please give me any suggestion? I attach here the configuration file we use.
Best regards,
Antonio Iuliano
|
|
French Language, posted by Yanick Vachon on Tue Nov 27 20:06:17 2018
|
Hi,
When i set Language = French in global config it works in french until i logout, after i can't login anymore, even if i enter my user and password i always stay at the login window, the only way to login again is to edit the Elogd.cfg file in Elog directory, remove the Language = french and save then i can login in and work normally in english version.
Thanks. |
Re: French Language, posted by Stefan Ritt on Wed Nov 28 09:26:11 2018
|
I just tried myself with the current version 3.1.4 and it worked for me flawlessly. Maybe you want to upgrade.
Stefan
Yanick Vachon wrote: |
Hi,
When i set Language = French in global config it works in french until i logout, after i can't login anymore, even if i enter my user and password i always stay at the login window, the only way to login again is to edit the Elogd.cfg file in Elog directory, remove the Language = french and save then i can login in and work normally in english version.
Thanks.
|
|
Re: French Language, posted by Yanick Vachon on Tue Dec 4 21:30:13 2018
|
I Stefan, i got the problem again with the french version, i realised that if i open it with Chrome or Edge it's not working but with Internet Explorer it works envery times. Is there a way i can use it with Chrome?
Thanks!
Stefan Ritt wrote: |
I just tried myself with the current version 3.1.4 and it worked for me flawlessly. Maybe you want to upgrade.
Stefan
Yanick Vachon wrote: |
Hi,
When i set Language = French in global config it works in french until i logout, after i can't login anymore, even if i enter my user and password i always stay at the login window, the only way to login again is to edit the Elogd.cfg file in Elog directory, remove the Language = french and save then i can login in and work normally in english version.
Thanks.
|
|
|
Re: French Language, posted by Stefan Ritt on Wed Dec 5 08:41:07 2018
|
Have you tried to delete all cookies in Chrome?
Stefan
Yanick Vachon wrote: |
I Stefan, i got the problem again with the french version, i realised that if i open it with Chrome or Edge it's not working but with Internet Explorer it works envery times. Is there a way i can use it with Chrome?
Thanks!
Stefan Ritt wrote: |
I just tried myself with the current version 3.1.4 and it worked for me flawlessly. Maybe you want to upgrade.
Stefan
Yanick Vachon wrote: |
Hi,
When i set Language = French in global config it works in french until i logout, after i can't login anymore, even if i enter my user and password i always stay at the login window, the only way to login again is to edit the Elogd.cfg file in Elog directory, remove the Language = french and save then i can login in and work normally in english version.
Thanks.
|
|
|
|
Re: French Language, posted by Yanick Vachon on Wed Dec 5 14:38:51 2018
|
I've deleted the cookies and it works.
Thanks!
Stefan Ritt wrote: |
Have you tried to delete all cookies in Chrome?
Stefan
Yanick Vachon wrote: |
I Stefan, i got the problem again with the french version, i realised that if i open it with Chrome or Edge it's not working but with Internet Explorer it works envery times. Is there a way i can use it with Chrome?
Thanks!
Stefan Ritt wrote: |
I just tried myself with the current version 3.1.4 and it worked for me flawlessly. Maybe you want to upgrade.
Stefan
Yanick Vachon wrote: |
Hi,
When i set Language = French in global config it works in french until i logout, after i can't login anymore, even if i enter my user and password i always stay at the login window, the only way to login again is to edit the Elogd.cfg file in Elog directory, remove the Language = french and save then i can login in and work normally in english version.
Thanks.
|
|
|
|
|
Need to change port 25, posted by Yanick Vachon on Mon Nov 26 17:32:31 2018
|
Hi,
We've made changes in our network and now we have to use port 587 instead of port 25, how can i edit that parameter?
Thanks |
Re: Need to change port 25, posted by Andreas Luedeke on Tue Nov 27 08:19:11 2018
|
This is nicely explained in the documentation: https://elog.psi.ch/elog/config.html#global
The following options are specific to the [global] section:
Port = <port>
Specifies the TCP port under which the server is listening. Default is 80. Can be superseeded via the '-p' command line flag.
Yanick Vachon wrote: |
Hi,
We've made changes in our network and now we have to use port 587 instead of port 25, how can i edit that parameter?
Thanks
|
|
Re: Need to change port 25, posted by Stefan Ritt on Tue Nov 27 08:59:45 2018
|
I believe Yanick means the SMTP port, not the port under which elogd is listening. The SMPT port is hard wired to 25, because port 587 was not yet defiend when I wrote that code. I can make this a variable, but only if it works. So Yanick can you test if port 587 accepts normal SMTP commands? We don't have such a new server at our lab and I cannot test it. Under Windows you can open a command prompt and telnet to the mail server:
telnet <server> 587
HELO test
MAIL FROM: test
your server should then reply with "220 ..." and "250 ..." messages. Once this works, I will implement the variable SMTP port.
Stefan
Andreas Luedeke wrote: |
This is nicely explained in the documentation: https://elog.psi.ch/elog/config.html#global
The following options are specific to the [global] section:
Port = <port>
Specifies the TCP port under which the server is listening. Default is 80. Can be superseeded via the '-p' command line flag.
Yanick Vachon wrote: |
Hi,
We've made changes in our network and now we have to use port 587 instead of port 25, how can i edit that parameter?
Thanks
|
|
|
Re: Need to change port 25, posted by Yanick Vachon on Tue Nov 27 15:21:31 2018
|
I Stefan, it works with the 587 port.

Stefan Ritt wrote: |
I believe Yanick means the SMTP port, not the port under which elogd is listening. The SMPT port is hard wired to 25, because port 587 was not yet defiend when I wrote that code. I can make this a variable, but only if it works. So Yanick can you test if port 587 accepts normal SMTP commands? We don't have such a new server at our lab and I cannot test it. Under Windows you can open a command prompt and telnet to the mail server:
telnet <server> 587
HELO test
MAIL FROM: test
your server should then reply with "220 ..." and "250 ..." messages. Once this works, I will implement the variable SMTP port.
Stefan
Andreas Luedeke wrote: |
This is nicely explained in the documentation: https://elog.psi.ch/elog/config.html#global
The following options are specific to the [global] section:
Port = <port>
Specifies the TCP port under which the server is listening. Default is 80. Can be superseeded via the '-p' command line flag.
Yanick Vachon wrote: |
Hi,
We've made changes in our network and now we have to use port 587 instead of port 25, how can i edit that parameter?
Thanks
|
|
|
|
Re: Need to change port 25, posted by Stefan Ritt on Wed Nov 28 16:24:43 2018
|
Ok, so I added the option
STMP port = xxx
where you can specify 587 to override the default port 25. I committed the changes to bitbucket. Can you compile from sources, or do I have to dig out my dusty Windows PC?
Stefan
Yanick Vachon wrote: |
I Stefan, it works with the 587 port.
|
|
Re: Need to change port 25, posted by Yanick Vachon on Wed Nov 28 18:23:59 2018
|
Good!
so, i've tried to compile but iwonder if i does it correctly,
look at the error i got:
Thanks again!
Stefan Ritt wrote: |
Ok, so I added the option
STMP port = xxx
where you can specify 587 to override the default port 25. I committed the changes to bitbucket. Can you compile from sources, or do I have to dig out my dusty Windows PC?
Stefan
Yanick Vachon wrote: |
I Stefan, it works with the 587 port.
|
|
|
Re: Need to change port 25, posted by Stefan Ritt on Thu Nov 29 09:56:45 2018
|
I put a new executable for you under https://elog.psi.ch/elog/download/windows/
It's named elog314-2.exe
Best,
Stefan
Yanick Vachon wrote: |
Good!
so, i've tried to compile but iwonder if i does it correctly,
look at the error i got:
Thanks again!
|
|
Re: Need to change port 25, posted by Yanick Vachon on Wed Nov 28 16:43:14 2018
|
Hello,
now we kwow it's working are you gonne send us a version with the SMTP port editable?
Thanks!
Yanick Vachon wrote: |
I Stefan, it works with the 587 port.

Stefan Ritt wrote: |
I believe Yanick means the SMTP port, not the port under which elogd is listening. The SMPT port is hard wired to 25, because port 587 was not yet defiend when I wrote that code. I can make this a variable, but only if it works. So Yanick can you test if port 587 accepts normal SMTP commands? We don't have such a new server at our lab and I cannot test it. Under Windows you can open a command prompt and telnet to the mail server:
telnet <server> 587
HELO test
MAIL FROM: test
your server should then reply with "220 ..." and "250 ..." messages. Once this works, I will implement the variable SMTP port.
Stefan
Andreas Luedeke wrote: |
This is nicely explained in the documentation: https://elog.psi.ch/elog/config.html#global
The following options are specific to the [global] section:
Port = <port>
Specifies the TCP port under which the server is listening. Default is 80. Can be superseeded via the '-p' command line flag.
Yanick Vachon wrote: |
Hi,
We've made changes in our network and now we have to use port 587 instead of port 25, how can i edit that parameter?
Thanks
|
|
|
|
|
Re: Need to change port 25, posted by Stefan Ritt on Wed Nov 28 16:53:58 2018
|
Just read my post 20 mins ago!
Stefan
Yanick Vachon wrote: |
Hello,
now we kwow it's working are you gonne send us a version with the SMTP port editable?
Thanks!
Yanick Vachon wrote: |
I Stefan, it works with the 587 port.

Stefan Ritt wrote: |
I believe Yanick means the SMTP port, not the port under which elogd is listening. The SMPT port is hard wired to 25, because port 587 was not yet defiend when I wrote that code. I can make this a variable, but only if it works. So Yanick can you test if port 587 accepts normal SMTP commands? We don't have such a new server at our lab and I cannot test it. Under Windows you can open a command prompt and telnet to the mail server:
telnet <server> 587
HELO test
MAIL FROM: test
your server should then reply with "220 ..." and "250 ..." messages. Once this works, I will implement the variable SMTP port.
Stefan
Andreas Luedeke wrote: |
This is nicely explained in the documentation: https://elog.psi.ch/elog/config.html#global
The following options are specific to the [global] section:
Port = <port>
Specifies the TCP port under which the server is listening. Default is 80. Can be superseeded via the '-p' command line flag.
Yanick Vachon wrote: |
Hi,
We've made changes in our network and now we have to use port 587 instead of port 25, how can i edit that parameter?
Thanks
|
|
|
|
|
|
messy code for chinese charactor, posted by Wenhao Huang on Fri Oct 26 08:56:59 2018
|
The Chinese character appears messy code. The encoding way is the default utf-8. How can I solve this problem? |
Re: messy code for chinese charactor, posted by Stefan Ritt on Sat Oct 27 10:51:12 2018
|
Can you post a screenshot?
Wenhao Huang wrote: | The Chinese character appears messy code. The encoding way is the default utf-8. How can I solve this problem? |
|
How many "Extendable options" can I add?, posted by Devrim Esenturk on Fri Oct 26 14:22:59 2018
|
Hi
I am trying to add "Extendable options" for some attribute as below example. However button to add new item for list appears only for the first "Extendable options", if disable the first with (;), button appears for the second. It means elog add new item button only the first line "Extendable options" not for other?
Is this a limitation or bug or am I doing something wrong?
Options Require = N/A, Camera{1}, Lens{2}, Other{3}
{1} MOptions Require Model= XNB-6001, PNM-7000VD, PNM-9000VQ, PNM-9320VQ
{2} MOptions Require Lens = SLA-T2480, SLA-T2480V, SLA-T4680, SLA-T4680V, SLA-T1080F, SLA-2M2400P, SLA-2M2800P, SLA-2M3600P, SLA-2M6000P, SLA-2M1200P, SLA-5M3700P, SLA-5M4600P, SLA-5M7000P, SLA-2M2400Q, SLA-2M2800Q, SLA-2M3600Q, SLA-2M6000Q, SLA-5M3700Q, SLA-5M4600Q, SLA-5M7000Q, SLA-2M2400D, SLA-2M2800D, SLA-2M3600D, SLA-2M6000D
{3} MOptions Require Other = Base Unit
Extendable options = Require Model
Extendable options = Require Lens
Extendable options = Require Other
Thank you
Devrim |
Re: How many "Extendable options" can I add?, posted by Grant Jeffcote on Fri Oct 26 16:46:52 2018
|
David,
Try
Extendable options = Require Model, Require Lens, Require Other,
Regards
Grant
Devrim Esenturk wrote: |
Hi
I am trying to add "Extendable options" for some attribute as below example. However button to add new item for list appears only for the first "Extendable options", if disable the first with (;), button appears for the second. It means elog add new item button only the first line "Extendable options" not for other?
Is this a limitation or bug or am I doing something wrong?
Options Require = N/A, Camera{1}, Lens{2}, Other{3}
{1} MOptions Require Model= XNB-6001, PNM-7000VD, PNM-9000VQ, PNM-9320VQ
{2} MOptions Require Lens = SLA-T2480, SLA-T2480V, SLA-T4680, SLA-T4680V, SLA-T1080F, SLA-2M2400P, SLA-2M2800P, SLA-2M3600P, SLA-2M6000P, SLA-2M1200P, SLA-5M3700P, SLA-5M4600P, SLA-5M7000P, SLA-2M2400Q, SLA-2M2800Q, SLA-2M3600Q, SLA-2M6000Q, SLA-5M3700Q, SLA-5M4600Q, SLA-5M7000Q, SLA-2M2400D, SLA-2M2800D, SLA-2M3600D, SLA-2M6000D
{3} MOptions Require Other = Base Unit
Extendable options = Require Model
Extendable options = Require Lens
Extendable options = Require Other
Thank you
Devrim
|
|
Re: How many "Extendable options" can I add?, posted by Grant Jeffcote on Fri Oct 26 16:50:48 2018
|
Apologies that should have been Devrim (autocorrect again) :-(
Grant Jeffcote wrote: |
David,
Try
Extendable options = Require Model, Require Lens, Require Other,
Regards
Grant
Devrim Esenturk wrote: |
Hi
I am trying to add "Extendable options" for some attribute as below example. However button to add new item for list appears only for the first "Extendable options", if disable the first with (;), button appears for the second. It means elog add new item button only the first line "Extendable options" not for other?
Is this a limitation or bug or am I doing something wrong?
Options Require = N/A, Camera{1}, Lens{2}, Other{3}
{1} MOptions Require Model= XNB-6001, PNM-7000VD, PNM-9000VQ, PNM-9320VQ
{2} MOptions Require Lens = SLA-T2480, SLA-T2480V, SLA-T4680, SLA-T4680V, SLA-T1080F, SLA-2M2400P, SLA-2M2800P, SLA-2M3600P, SLA-2M6000P, SLA-2M1200P, SLA-5M3700P, SLA-5M4600P, SLA-5M7000P, SLA-2M2400Q, SLA-2M2800Q, SLA-2M3600Q, SLA-2M6000Q, SLA-5M3700Q, SLA-5M4600Q, SLA-5M7000Q, SLA-2M2400D, SLA-2M2800D, SLA-2M3600D, SLA-2M6000D
{3} MOptions Require Other = Base Unit
Extendable options = Require Model
Extendable options = Require Lens
Extendable options = Require Other
Thank you
Devrim
|
|
|
Re: How many "Extendable options" can I add?, posted by Devrim Esenturk on Fri Oct 26 19:15:19 2018
|
No problem :)
Your suggestion worked as it must be. I didn't see "Extendable options = <list>" on guide :/
I guess I need rest a little bit... :(
Thank you
Have a great weekend
Devrim
Grant Jeffcote wrote: |
Apologies that should have been Devrim (autocorrect again) :-(
Grant Jeffcote wrote: |
David,
Try
Extendable options = Require Model, Require Lens, Require Other,
Regards
Grant
Devrim Esenturk wrote: |
Hi
I am trying to add "Extendable options" for some attribute as below example. However button to add new item for list appears only for the first "Extendable options", if disable the first with (;), button appears for the second. It means elog add new item button only the first line "Extendable options" not for other?
Is this a limitation or bug or am I doing something wrong?
Options Require = N/A, Camera{1}, Lens{2}, Other{3}
{1} MOptions Require Model= XNB-6001, PNM-7000VD, PNM-9000VQ, PNM-9320VQ
{2} MOptions Require Lens = SLA-T2480, SLA-T2480V, SLA-T4680, SLA-T4680V, SLA-T1080F, SLA-2M2400P, SLA-2M2800P, SLA-2M3600P, SLA-2M6000P, SLA-2M1200P, SLA-5M3700P, SLA-5M4600P, SLA-5M7000P, SLA-2M2400Q, SLA-2M2800Q, SLA-2M3600Q, SLA-2M6000Q, SLA-5M3700Q, SLA-5M4600Q, SLA-5M7000Q, SLA-2M2400D, SLA-2M2800D, SLA-2M3600D, SLA-2M6000D
{3} MOptions Require Other = Base Unit
Extendable options = Require Model
Extendable options = Require Lens
Extendable options = Require Other
Thank you
Devrim
|
|
|
|
Buttons missing in ckeditor, posted by Roland Beyer on Thu Oct 11 10:51:17 2018
|
Hello everybody,
we had to setup a new server for our elog some time ago because the old one crashed. We are now running version ELOG V3.1.1-0767eb0.
In the previous installation we had these nice buttons for file upload, time stamp and equation editor, which are also available here in the online version.
I already found that in the installation directory ("/usr/local/elog/") there exists a directory "scripts" containing a file "ckeditor-config.js", which also contains the lines:
"config.extraPlugins = 'timestamp,dndfiles,eqneditor,fileupload';" and "{ name: 'insert', items: [ 'Image', 'Table', 'HorizontalRule', 'Smiley', 'SpecialChar', 'PageBreak', 'FileUpload', 'Timestamp', 'EqnEditor' ] },"
These plugins seem to be available in the subdirectory "scripts/ckeditor/plugins/". But why are they not loaded? Is it just a version issue? Or something else?
It would be nice to get a hint.
Best regards,
Roland |
Re: Buttons missing in ckeditor, posted by Stefan Ritt on Fri Oct 12 10:17:20 2018
|
Have you selected "HTML" encoding (below the main message box). The HTML editor is not activated if you have "plain" text encoding. Did you try the default elogd.cfg file? If you modified the config file and did a mistake there, the program can for example not properly find all directories. Also makse sure you did a full install with "make install", not just update the executable.
Stefan
Roland Beyer wrote: |
Hello everybody,
we had to setup a new server for our elog some time ago because the old one crashed. We are now running version ELOG V3.1.1-0767eb0.
In the previous installation we had these nice buttons for file upload, time stamp and equation editor, which are also available here in the online version.
I already found that in the installation directory ("/usr/local/elog/") there exists a directory "scripts" containing a file "ckeditor-config.js", which also contains the lines:
"config.extraPlugins = 'timestamp,dndfiles,eqneditor,fileupload';" and "{ name: 'insert', items: [ 'Image', 'Table', 'HorizontalRule', 'Smiley', 'SpecialChar', 'PageBreak', 'FileUpload', 'Timestamp', 'EqnEditor' ] },"
These plugins seem to be available in the subdirectory "scripts/ckeditor/plugins/". But why are they not loaded? Is it just a version issue? Or something else?
It would be nice to get a hint.
Best regards,
Roland
|
|
Re: Buttons missing in ckeditor, posted by Roland Beyer on Fri Oct 12 11:56:26 2018
|
Dear Stefan,
thanks for your hints. Meanwhile we already solved the problem. I think it was caused by the recovery from a backup version after the server crash ... and the retirement of the person who did the previous installation.
We found the following things to be faulty:
- Somebody linked the "elog/scripts/ckeditor"-directory to "../../javascript/ckeditor" (maybe an independent installation of ckeditor). Due to this the relative path in "ckeditor/config.js" to "../ckeditor-config.js" could not be correctly resolved to be "elog/scripts/ckeditor-config.js". Now we put the absolute path.
- Furthermore the owner of all files in the elog directory was set to root:root with read access only for root. We changed them now to root:elog and gave read acess for everybody.
Now everything works as expected.
I'm sorry for inconvenience,
Thanks and best regards,
Roland
Stefan Ritt wrote: |
Have you selected "HTML" encoding (below the main message box). The HTML editor is not activated if you have "plain" text encoding. Did you try the default elogd.cfg file? If you modified the config file and did a mistake there, the program can for example not properly find all directories. Also makse sure you did a full install with "make install", not just update the executable.
Stefan
Roland Beyer wrote: |
Hello everybody,
we had to setup a new server for our elog some time ago because the old one crashed. We are now running version ELOG V3.1.1-0767eb0.
In the previous installation we had these nice buttons for file upload, time stamp and equation editor, which are also available here in the online version.
I already found that in the installation directory ("/usr/local/elog/") there exists a directory "scripts" containing a file "ckeditor-config.js", which also contains the lines:
"config.extraPlugins = 'timestamp,dndfiles,eqneditor,fileupload';" and "{ name: 'insert', items: [ 'Image', 'Table', 'HorizontalRule', 'Smiley', 'SpecialChar', 'PageBreak', 'FileUpload', 'Timestamp', 'EqnEditor' ] },"
These plugins seem to be available in the subdirectory "scripts/ckeditor/plugins/". But why are they not loaded? Is it just a version issue? Or something else?
It would be nice to get a hint.
Best regards,
Roland
|
|
|
Compile issues on Fedora withe current elog source, posted by Allen Tuttle on Tue Sep 11 19:46:40 2018
|
Tried compiling on FC27 and 28, both result in binaries but with serious issues; writing data larger than then allowed.
Example output:
make
gcc -O3 -funroll-loops -fomit-frame-pointer -W -Wall -Wno-deprecated-declarations -Imxml -DHAVE_SSL -c -o mxml.o mxml/mxml.c
gcc -O3 -funroll-loops -fomit-frame-pointer -W -Wall -Wno-deprecated-declarations -Imxml -DHAVE_SSL -w -c -o crypt.o src/crypt.c
gcc -O3 -funroll-loops -fomit-frame-pointer -W -Wall -Wno-deprecated-declarations -Imxml -DHAVE_SSL -w -c -o regex.o src/regex.c
gcc -O3 -funroll-loops -fomit-frame-pointer -W -Wall -Wno-deprecated-declarations -Imxml -DHAVE_SSL -c -o strlcpy.o mxml/strlcpy.c
gcc -O3 -funroll-loops -fomit-frame-pointer -W -Wall -Wno-deprecated-declarations -Imxml -DHAVE_SSL -o elog src/elog.c mxml.o crypt.o regex.o strlcpy.o -lssl
gcc -O3 -funroll-loops -fomit-frame-pointer -W -Wall -Wno-deprecated-declarations -Imxml -DHAVE_SSL -w -c -o auth.o src/auth.c
gcc -O3 -funroll-loops -fomit-frame-pointer -W -Wall -Wno-deprecated-declarations -Imxml -DHAVE_SSL -o elogd src/elogd.c auth.o mxml.o crypt.o regex.o strlcpy.o -lssl
src/elogd.c: In function ‘el_retrieve’:
src/elogd.c:4503:26: warning: ‘%s’ directive writing up to 255 bytes into a region of size between 1 and 256 [-Wformat-overflow=]
sprintf(file_name, "%s%s%s", lbs->data_dir, lbs->el_index[index].subdir, lbs->el_index[index].file_name);
^~
src/elogd.c:4503:4: note: ‘sprintf’ output between 1 and 542 bytes into a destination of size 256
sprintf(file_name, "%s%s%s", lbs->data_dir, lbs->el_index[index].subdir, lbs->el_index[index].file_name);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c: In function ‘el_retrieve_attachment.part.30’:
src/elogd.c:4764:26: warning: ‘%s’ directive writing up to 255 bytes into a region of size between 1 and 256 [-Wformat-overflow=]
sprintf(file_name, "%s%s%s", lbs->data_dir, lbs->el_index[index].subdir, lbs->el_index[index].file_name);
^~
src/elogd.c:4764:4: note: ‘sprintf’ output between 1 and 542 bytes into a destination of size 256
sprintf(file_name, "%s%s%s", lbs->data_dir, lbs->el_index[index].subdir, lbs->el_index[index].file_name);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c: In function ‘el_submit.constprop’:
src/elogd.c:4894:29: warning: ‘%s’ directive writing up to 255 bytes into a region of size between 1 and 256 [-Wformat-overflow=]
sprintf(file_name, "%s%s%s", lbs->data_dir, lbs->el_index[index].subdir, lbs->el_index[index].file_name);
^~
src/elogd.c:4894:7: note: ‘sprintf’ output between 1 and 542 bytes into a destination of size 256
sprintf(file_name, "%s%s%s", lbs->data_dir, lbs->el_index[index].subdir, lbs->el_index[index].file_name);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c: In function ‘el_submit’:
src/elogd.c:4894:29: warning: ‘%s’ directive writing up to 255 bytes into a region of size between 1 and 256 [-Wformat-overflow=]
sprintf(file_name, "%s%s%s", lbs->data_dir, lbs->el_index[index].subdir, lbs->el_index[index].file_name);
^~
src/elogd.c:4894:7: note: ‘sprintf’ output between 1 and 542 bytes into a destination of size 256
sprintf(file_name, "%s%s%s", lbs->data_dir, lbs->el_index[index].subdir, lbs->el_index[index].file_name);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c: In function ‘el_retrieve.constprop’:
src/elogd.c:4503:26: warning: ‘%s’ directive writing up to 255 bytes into a region of size between 1 and 256 [-Wformat-overflow=]
sprintf(file_name, "%s%s%s", lbs->data_dir, lbs->el_index[index].subdir, lbs->el_index[index].file_name);
^~
src/elogd.c:4503:4: note: ‘sprintf’ output between 1 and 542 bytes into a destination of size 256
sprintf(file_name, "%s%s%s", lbs->data_dir, lbs->el_index[index].subdir, lbs->el_index[index].file_name);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c: In function ‘el_retrieve.constprop’:
src/elogd.c:4503:26: warning: ‘%s’ directive writing up to 255 bytes into a region of size between 1 and 256 [-Wformat-overflow=]
sprintf(file_name, "%s%s%s", lbs->data_dir, lbs->el_index[index].subdir, lbs->el_index[index].file_name);
^~
src/elogd.c:4503:4: note: ‘sprintf’ output between 1 and 542 bytes into a destination of size 256
sprintf(file_name, "%s%s%s", lbs->data_dir, lbs->el_index[index].subdir, lbs->el_index[index].file_name);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c: In function ‘el_retrieve.constprop’:
src/elogd.c:4503:26: warning: ‘%s’ directive writing up to 255 bytes into a region of size between 1 and 256 [-Wformat-overflow=]
sprintf(file_name, "%s%s%s", lbs->data_dir, lbs->el_index[index].subdir, lbs->el_index[index].file_name);
^~
src/elogd.c:4503:4: note: ‘sprintf’ output between 1 and 542 bytes into a destination of size 256
sprintf(file_name, "%s%s%s", lbs->data_dir, lbs->el_index[index].subdir, lbs->el_index[index].file_name);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c: In function ‘show_download_page’:
src/elogd.c:14775:32: warning: ‘%s’ directive writing up to 255 bytes into a region of size between 1 and 256 [-Wformat-overflow=]
sprintf(file_name, "%s%s%s", lbs->data_dir, lbs->el_index[index].subdir, lbs->el_index[index].file_name);
^~
src/elogd.c:14775:10: note: ‘sprintf’ output between 1 and 542 bytes into a destination of size 256
sprintf(file_name, "%s%s%s", lbs->data_dir, lbs->el_index[index].subdir, lbs->el_index[index].file_name);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c: In function ‘search_last_reply’:
.
.
.
Anyone aware of a cure? |
Re: Compile issues on Fedora withe current elog source, posted by Stefan Ritt on Wed Sep 12 11:10:18 2018
|
This warning is triggered by the use of the sprintf() funciton, which can write beyond the boundary of the destination string. I replaced it by snprintf(), which should make the compiler happy. Code is committed. Unfortuantely I have no FC27 here, so if there is still some waring with the current code, please post the full warning list here.
Stefan |
Re: Compile issues on Fedora withe current elog source, posted by Allen Tuttle on Wed Sep 12 15:25:07 2018
|
I would like to try the new code, I don't see it on elog/download/tar/.
Do you keep updates elsewhere like on get or sourceforge?
Stefan Ritt wrote: |
This warning is triggered by the use of the sprintf() funciton, which can write beyond the boundary of the destination string. I replaced it by snprintf(), which should make the compiler happy. Code is committed. Unfortuantely I have no FC27 here, so if there is still some waring with the current code, please post the full warning list here.
Stefan
|
|
Re: Compile issues on Fedora withe current elog source, posted by Allen Tuttle on Wed Sep 12 15:57:31 2018
|
A quick test suggests I can't just replace sprintf with snprintf.
Original error:
src/elogd.c:4503:4: note: ‘sprintf’ output between 1 and 542 bytes into a destination of size 256 [-Wformat-overflow=]
sprintf(file_name, "%s%s%s", lbs->data_dir, lbs->el_index[index].subdir, lbs->el_index[index].file_name);
^~
New error:
src/elogd.c:4503:24: warning: passing argument 2 of ‘snprintf’ makes integer from pointer without a cast [-Wint-conversion]
snprintf(file_name, "%s%s%s", lbs->data_dir, lbs->el_index[index].subdir, lbs->el_index[index].file_name);
^~~~~~~~
In file included from src/elogd.h:42:0,
from src/elogd.c:38:
/usr/include/stdio.h:340:12: note: expected ‘size_t {aka long unsigned int}’ but argument is of type ‘char *’
extern int snprintf (char *__restrict __s, size_t __maxlen,
Allen Tuttle wrote: |
I would like to try the new code, I don't see it on elog/download/tar/.
Do you keep updates elsewhere like on get or sourceforge?
Stefan Ritt wrote: |
This warning is triggered by the use of the sprintf() funciton, which can write beyond the boundary of the destination string. I replaced it by snprintf(), which should make the compiler happy. Code is committed. Unfortuantely I have no FC27 here, so if there is still some waring with the current code, please post the full warning list here.
Stefan
|
|
|
Re: Compile issues on Fedora withe current elog source, posted by Andreas Luedeke on Wed Sep 12 20:52:22 2018
|
Stefan said "code is commited": that means you can download the latest version from https://bitbucket.org/ritt/elog, as described in https://elog.psi.ch/elog/download.html, and then compile it. Clear now?
Stefan Ritt wrote: |
This warning is triggered by the use of the sprintf() funciton, which can write beyond the boundary of the destination string. I replaced it by snprintf(), which should make the compiler happy. Code is committed. Unfortuantely I have no FC27 here, so if there is still some waring with the current code, please post the full warning list here.
Stefan
|
|
Re: Compile issues on Fedora withe current elog source, posted by Allen Tuttle on Thu Sep 13 06:12:59 2018
|
Latest compile effort on Fedora 28 using the bitbucket source downloaded at 21:12 PDT:
make
gcc -O3 -funroll-loops -fomit-frame-pointer -W -Wall -Wno-deprecated-declarations -Imxml -DHAVE_SSL -c -o mxml.o mxml/mxml.c
mxml/mxml.c: In function ‘mxml_write_attribute.part.1’:
mxml/mxml.c:515:25: warning: ‘%s’ directive writing up to 4095 bytes into a region of size between 4094 and 8189 [-Wformat-overflow=]
sprintf(line, " %s=\"%s\"", name_enc, val_enc);
^~ ~~~~~~~
mxml/mxml.c:515:4: note: ‘sprintf’ output between 5 and 8195 bytes into a destination of size 8192
sprintf(line, " %s=\"%s\"", name_enc, val_enc);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
mxml/mxml.c: In function ‘mxml_parse_entity’:
mxml/mxml.c:1932:38: warning: ‘sprintf’ may write a terminating nul past the end of the destination [-Wformat-overflow=]
sprintf(filename, "%s%c%s", directoryname, DIR_SEPARATOR, entity_reference_name[i]);
^
mxml/mxml.c:1932:13: note: ‘sprintf’ output 2 or more bytes (assuming 4097) into a destination of size 4096
sprintf(filename, "%s%c%s", directoryname, DIR_SEPARATOR, entity_reference_name[i]);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
gcc -O3 -funroll-loops -fomit-frame-pointer -W -Wall -Wno-deprecated-declarations -Imxml -DHAVE_SSL -w -c -o crypt.o src/crypt.c
gcc -O3 -funroll-loops -fomit-frame-pointer -W -Wall -Wno-deprecated-declarations -Imxml -DHAVE_SSL -w -c -o regex.o src/regex.c
gcc -O3 -funroll-loops -fomit-frame-pointer -W -Wall -Wno-deprecated-declarations -Imxml -DHAVE_SSL -c -o strlcpy.o mxml/strlcpy.c
gcc -O3 -funroll-loops -fomit-frame-pointer -W -Wall -Wno-deprecated-declarations -Imxml -DHAVE_SSL -o elog src/elog.c mxml.o crypt.o regex.o strlcpy.o -lssl
src/elog.c: In function ‘retrieve_elog’:
src/elog.c:524:13: warning: ‘strncpy’ specified bound 256 equals destination size [-Wstringop-truncation]
strncpy(str, strstr(response, "Location:") + 10, sizeof(str));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elog.c: In function ‘submit_elog’:
src/elog.c:982:10: warning: ‘strncpy’ specified bound 80 equals destination size [-Wstringop-truncation]
strncpy(str, strstr(response, "Error: Attribute") + 20, sizeof(str));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elog.c:977:10: warning: ‘strncpy’ specified bound 80 equals destination size [-Wstringop-truncation]
strncpy(str, strstr(response, "Error: Attribute") + 27, sizeof(str));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elog.c:956:13: warning: ‘strncpy’ specified bound 80 equals destination size [-Wstringop-truncation]
strncpy(str, strstr(response, "Location:") + 10, sizeof(str));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
gcc -O3 -funroll-loops -fomit-frame-pointer -W -Wall -Wno-deprecated-declarations -Imxml -DHAVE_SSL -w -c -o auth.o src/auth.c
gcc -O3 -funroll-loops -fomit-frame-pointer -W -Wall -Wno-deprecated-declarations -Imxml -DHAVE_SSL -o elogd src/elogd.c auth.o mxml.o crypt.o regex.o strlcpy.o -lssl
src/elogd.c: In function ‘cleanup’:
src/elogd.c:30641:48: warning: ‘%s’ directive writing up to 255 bytes into a region of size 233 [-Wformat-overflow=]
sprintf(str, "Cannot remove pidfile \"%s\"\n", pidfile);
^~ ~~~~~~~
src/elogd.c:30641:10: note: ‘sprintf’ output between 26 and 281 bytes into a destination of size 256
sprintf(str, "Cannot remove pidfile \"%s\"\n", pidfile);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c: In function ‘split_url’:
src/elogd.c:2490:4: warning: ‘strncpy’ specified bound 256 equals destination size [-Wstringop-truncation]
strncpy(str, p, sizeof(str));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c: In function ‘getcfg’:
src/elogd.c:3091:28: warning: ‘%s’ directive writing up to 255 bytes into a region of size 249 [-Wformat-overflow=]
src/elogd.c:2753:14:
return _topgroup;
~~~~~~~~~
src/elogd.c:3091:28:
sprintf(str, "global %s", getcfg_topgroup());
^~
src/elogd.c:3091:7: note: ‘sprintf’ output between 8 and 263 bytes into a destination of size 256
sprintf(str, "global %s", getcfg_topgroup());
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c: In function ‘getcfg.constprop’:
src/elogd.c:3091:28: warning: ‘%s’ directive writing up to 255 bytes into a region of size 249 [-Wformat-overflow=]
src/elogd.c:2753:14:
return _topgroup;
~~~~~~~~~
src/elogd.c:3091:28:
sprintf(str, "global %s", getcfg_topgroup());
^~
src/elogd.c:3091:7: note: ‘sprintf’ output between 8 and 263 bytes into a destination of size 256
sprintf(str, "global %s", getcfg_topgroup());
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c: In function ‘ss_file_find’:
src/elogd.c:3775:10: warning: ‘strncpy’ output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation]
strncpy(*plist + (i * MAX_PATH_LENGTH), dp->d_name, strlen(dp->d_name));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c: In function ‘html_allowed’:
src/elogd.c:3091:28: warning: ‘%s’ directive writing up to 255 bytes into a region of size 249 [-Wformat-overflow=]
src/elogd.c:2753:14:
return _topgroup;
~~~~~~~~~
src/elogd.c:3091:28:
sprintf(str, "global %s", getcfg_topgroup());
^~
src/elogd.c:3091:7: note: ‘sprintf’ output between 8 and 263 bytes into a destination of size 256
sprintf(str, "global %s", getcfg_topgroup());
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c: In function ‘create_thumbnail.part.38’:
src/elogd.c:24226:41: warning: ‘%s’ directive writing up to 511 bytes into a region of size 243 [-Wformat-overflow=]
sprintf(thumb_size, " -thumbnail '%s'", str);
^~ ~~~
src/elogd.c:24226:7: note: ‘sprintf’ output between 15 and 526 bytes into a destination of size 256
sprintf(thumb_size, " -thumbnail '%s'", str);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:24253:40: warning: ‘ '’ directive output may be truncated writing 2 bytes into a region of size between 1 and 511 [-Wformat-truncation=]
snprintf(cmd, sizeof(cmd), "%s %s '%s[0-7]'%s '%s'", _convert_cmd, thumb_options, file_name, thumb_size, str);
^~
src/elogd.c:24253:7: note: ‘snprintf’ output 13 or more bytes (assuming 1289) into a destination of size 512
snprintf(cmd, sizeof(cmd), "%s %s '%s[0-7]'%s '%s'", _convert_cmd, thumb_options, file_name, thumb_size, str);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:24255:40: warning: ‘ '’ directive output may be truncated writing 2 bytes into a region of size between 1 and 511 [-Wformat-truncation=]
snprintf(cmd, sizeof(cmd), "%s %s '%s'%s '%s'", _convert_cmd, thumb_options, file_name, thumb_size, str);
^~
src/elogd.c:24255:7: note: ‘snprintf’ output 8 or more bytes (assuming 1284) into a destination of size 512
snprintf(cmd, sizeof(cmd), "%s %s '%s'%s '%s'", _convert_cmd, thumb_options, file_name, thumb_size, str);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:24263:40: warning: ‘%s’ directive output may be truncated writing up to 511 bytes into a region of size 505 [-Wformat-truncation=]
snprintf(str, sizeof(str), "SHELL \"%s\"", cmd);
^~ ~~~
src/elogd.c:24263:4: note: ‘snprintf’ output between 9 and 520 bytes into a destination of size 512
snprintf(str, sizeof(str), "SHELL \"%s\"", cmd);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c: In function ‘rsputs_elcode’:
src/elogd.c:6618:71: warning: ‘%s’ directive output may be truncated writing up to 999 bytes into a region of size 993 [-Wformat-truncation=]
snprintf(hattrib, sizeof(hattrib), "http://%s", attrib);
^~ ~~~~~~
src/elogd.c:6618:28: note: ‘snprintf’ output between 8 and 1007 bytes into a destination of size 1000
snprintf(hattrib, sizeof(hattrib), "http://%s", attrib);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:6616:72: warning: ‘%s’ directive output may be truncated writing up to 999 bytes into a region of size 992 [-Wformat-truncation=]
snprintf(hattrib, sizeof(hattrib), "https://%s", attrib);
^~ ~~~~~~
src/elogd.c:6616:28: note: ‘snprintf’ output between 9 and 1008 bytes into a destination of size 1000
snprintf(hattrib, sizeof(hattrib), "https://%s", attrib);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:6568:53: warning: ‘%s’ directive writing up to 999 bytes into a region of size 993 [-Wformat-overflow=]
sprintf(hattrib, "http://%s", attrib);
^~ ~~~~~~
src/elogd.c:6568:28: note: ‘sprintf’ output between 8 and 1007 bytes into a destination of size 1000
sprintf(hattrib, "http://%s", attrib);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:6566:54: warning: ‘%s’ directive writing up to 999 bytes into a region of size 992 [-Wformat-overflow=]
sprintf(hattrib, "https://%s", attrib);
^~ ~~~~~~
src/elogd.c:6566:28: note: ‘sprintf’ output between 9 and 1008 bytes into a destination of size 1000
sprintf(hattrib, "https://%s", attrib);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c: In function ‘el_submit_attachment’:
src/elogd.c:4696:55: warning: ‘%s’ directive writing up to 255 bytes into a region of size 226 [-Wformat-overflow=]
sprintf(str, "Cannot write attachment file \"%s\"", file_name);
^~ ~~~~~~~~~
src/elogd.c:4696:10: note: ‘sprintf’ output between 32 and 287 bytes into a destination of size 256
sprintf(str, "Cannot write attachment file \"%s\"", file_name);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c: In function ‘attrib_from_param’:
src/elogd.c:9364:30: warning: ‘%d’ directive writing between 1 and 3 bytes into a region of size between 0 and 1499 [-Wformat-overflow=]
sprintf(str, "%s_%d", ua, j);
^~
src/elogd.c:9364:26: note: directive argument in the range [0, 100]
sprintf(str, "%s_%d", ua, j);
^~~~~~~
src/elogd.c:9364:13: note: ‘sprintf’ output between 3 and 1504 bytes into a destination of size 1500
sprintf(str, "%s_%d", ua, j);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c: In function ‘el_retrieve’:
src/elogd.c:4503:46: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size between 1 and 256 [-Wformat-truncation=]
snprintf(file_name, sizeof(file_name), "%s%s%s", lbs->data_dir, lbs->el_index[index].subdir, lbs->el_index[index].file_name);
^~
src/elogd.c:4503:4: note: ‘snprintf’ output between 1 and 542 bytes into a destination of size 256
snprintf(file_name, sizeof(file_name), "%s%s%s", lbs->data_dir, lbs->el_index[index].subdir, lbs->el_index[index].file_name);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c: In function ‘el_retrieve_attachment.part.32’:
src/elogd.c:4764:46: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size between 1 and 256 [-Wformat-truncation=]
snprintf(file_name, sizeof(file_name), "%s%s%s", lbs->data_dir, lbs->el_index[index].subdir, lbs->el_index[index].file_name);
^~
src/elogd.c:4764:4: note: ‘snprintf’ output between 1 and 542 bytes into a destination of size 256
snprintf(file_name, sizeof(file_name), "%s%s%s", lbs->data_dir, lbs->el_index[index].subdir, lbs->el_index[index].file_name);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c: In function ‘el_submit’:
src/elogd.c:4894:49: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size between 1 and 256 [-Wformat-truncation=]
snprintf(file_name, sizeof(file_name), "%s%s%s", lbs->data_dir, lbs->el_index[index].subdir, lbs->el_index[index].file_name);
^~
src/elogd.c:4894:7: note: ‘snprintf’ output between 1 and 542 bytes into a destination of size 256
snprintf(file_name, sizeof(file_name), "%s%s%s", lbs->data_dir, lbs->el_index[index].subdir, lbs->el_index[index].file_name);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c: In function ‘el_retrieve.constprop’:
src/elogd.c:4503:46: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size between 1 and 256 [-Wformat-truncation=]
snprintf(file_name, sizeof(file_name), "%s%s%s", lbs->data_dir, lbs->el_index[index].subdir, lbs->el_index[index].file_name);
^~
src/elogd.c:4503:4: note: ‘snprintf’ output between 1 and 542 bytes into a destination of size 256
snprintf(file_name, sizeof(file_name), "%s%s%s", lbs->data_dir, lbs->el_index[index].subdir, lbs->el_index[index].file_name);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c: In function ‘el_retrieve.constprop’:
src/elogd.c:4503:46: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size between 1 and 256 [-Wformat-truncation=]
snprintf(file_name, sizeof(file_name), "%s%s%s", lbs->data_dir, lbs->el_index[index].subdir, lbs->el_index[index].file_name);
^~
src/elogd.c:4503:4: note: ‘snprintf’ output between 1 and 542 bytes into a destination of size 256
snprintf(file_name, sizeof(file_name), "%s%s%s", lbs->data_dir, lbs->el_index[index].subdir, lbs->el_index[index].file_name);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c: In function ‘show_download_page’:
src/elogd.c:14786:52: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size between 1 and 256 [-Wformat-truncation=]
snprintf(file_name, sizeof(file_name), "%s%s%s", lbs->data_dir, lbs->el_index[index].subdir, lbs->el_index[index].file_name);
^~
src/elogd.c:14786:10: note: ‘snprintf’ output between 1 and 542 bytes into a destination of size 256
snprintf(file_name, sizeof(file_name), "%s%s%s", lbs->data_dir, lbs->el_index[index].subdir, lbs->el_index[index].file_name);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c: In function ‘show_page_filters’:
src/elogd.c:19317:45: warning: ‘$’ directive writing 1 byte into a region of size between 0 and 1499 [-Wformat-overflow=]
sprintf(option_whole, "^%s$", option);
^
src/elogd.c:19317:19: note: ‘sprintf’ output between 3 and 1502 bytes into a destination of size 1500
sprintf(option_whole, "^%s$", option);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c: In function ‘is_inline_attachment’:
src/elogd.c:24205:31: warning: ‘%s’ directive writing up to 255 bytes into a region of size between 237 and 247 [-Wformat-overflow=]
sprintf(str, "cid:att%d@%s", i, domain);
^~ ~~~~~~
src/elogd.c:24205:7: note: ‘sprintf’ output between 10 and 275 bytes into a destination of size 256
sprintf(str, "cid:att%d@%s", i, domain);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c: In function ‘load_password_file’:
src/elogd.c:25739:58: warning: ‘%s’ directive writing up to 255 bytes into a region of size 226 [-Wformat-overflow=]
sprintf(str, "Cannot convert password file \"%s\"", file_name);
^~ ~~~~~~~~~
src/elogd.c:25739:13: note: ‘sprintf’ output between 32 and 287 bytes into a destination of size 256
sprintf(str, "Cannot convert password file \"%s\"", file_name);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:25728:70: warning: ‘%s’ directive writing up to 255 bytes into a region of size 211 [-Wformat-overflow=]
sprintf(str, "Cannot access write protected password file \"%s\"", file_name);
^~ ~~~~~~~~~
src/elogd.c:25728:10: note: ‘sprintf’ output between 47 and 302 bytes into a destination of size 256
sprintf(str, "Cannot access write protected password file \"%s\"", file_name);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:25719:54: warning: ‘%s’ directive writing up to 255 bytes into a region of size 227 [-Wformat-overflow=]
sprintf(str, "Cannot access password file \"%s\"", file_name);
^~ ~~~~~~~~~
src/elogd.c:25719:10: note: ‘sprintf’ output between 31 and 286 bytes into a destination of size 256
sprintf(str, "Cannot access password file \"%s\"", file_name);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:25699:43: warning: ‘%s’ directive writing up to 255 bytes into a region of size 238 [-Wformat-overflow=]
sprintf(str, "Cannot open file \"%s\"", file_name);
^~ ~~~~~~~~~
src/elogd.c:25699:10: note: ‘sprintf’ output between 20 and 275 bytes into a destination of size 256
sprintf(str, "Cannot open file \"%s\"", file_name);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c: In function ‘rename_logbook’:
src/elogd.c:13118:27: warning: ‘%s’ directive writing up to 255 bytes into a region of size between 1 and 256 [-Wformat-overflow=]
sprintf(old_dir, "%s%s", lb_dir, lbs->name);
^~
src/elogd.c:13118:7: note: ‘sprintf’ output between 1 and 511 bytes into a destination of size 256
sprintf(old_dir, "%s%s", lb_dir, lbs->name);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c: In function ‘execute_shell.part.42’:
src/elogd.c:22772:26: warning: ‘%s’ directive writing up to 9999 bytes into a region of size 1493 [-Wformat-overflow=]
sprintf(str, "SHELL \"%s\"", shell_cmd);
^~ ~~~~~~~~~
src/elogd.c:22772:4: note: ‘sprintf’ output between 9 and 10008 bytes into a destination of size 1500
sprintf(str, "SHELL \"%s\"", shell_cmd);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c: In function ‘el_delete_message’:
src/elogd.c:5242:46: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size between 1 and 256 [-Wformat-truncation=]
snprintf(file_name, sizeof(file_name), "%s%s%s", lbs->data_dir, lbs->el_index[index].subdir, lbs->el_index[index].file_name);
^~
src/elogd.c:5242:4: note: ‘snprintf’ output between 1 and 542 bytes into a destination of size 256
snprintf(file_name, sizeof(file_name), "%s%s%s", lbs->data_dir, lbs->el_index[index].subdir, lbs->el_index[index].file_name);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c: In function ‘copy_to’:
src/elogd.c:24081:28: warning: ‘%s’ directive writing up to 255 bytes into a region of size 252 [-Wformat-overflow=]
sprintf(str, "?lb=%s\"", lbs->name_enc);
^~
src/elogd.c:24081:10: note: ‘sprintf’ output between 6 and 261 bytes into a destination of size 256
sprintf(str, "?lb=%s\"", lbs->name_enc);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:24085:28: warning: ‘%s’ directive writing up to 255 bytes into a region of size 252 [-Wformat-overflow=]
sprintf(str, "?lb=%s&", lbs->name_enc);
^~
src/elogd.c:24085:10: note: ‘sprintf’ output between 6 and 261 bytes into a destination of size 256
sprintf(str, "?lb=%s&", lbs->name_enc);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:24085:28: warning: ‘%s’ directive writing up to 255 bytes into a region of size 252 [-Wformat-overflow=]
sprintf(str, "?lb=%s&", lbs->name_enc);
^~
src/elogd.c:24085:10: note: ‘sprintf’ output between 6 and 261 bytes into a destination of size 256
sprintf(str, "?lb=%s&", lbs->name_enc);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c: In function ‘show_logbook_new’:
src/elogd.c:14689:24: warning: ‘%s’ directive writing up to 255 bytes into a region of size 253 [-Wformat-overflow=]
sprintf(str, "../%s/?cmd=Config", lbn);
^~ ~~~
src/elogd.c:14689:7: note: ‘sprintf’ output between 16 and 271 bytes into a destination of size 256
sprintf(str, "../%s/?cmd=Config", lbn);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c: In function ‘display_line’:
src/elogd.c:17743:37: warning: ‘%s’ directive writing up to 1499 bytes into a region of size between 1412 and 1491 [-Wformat-overflow=]
sprintf(str, "%s\" style=\"%s", rowstyle, display);
^~ ~~~~~~~
src/elogd.c:17743:10: note: ‘sprintf’ output between 10 and 1588 bytes into a destination of size 1500
sprintf(str, "%s\" style=\"%s", rowstyle, display);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:17841:33: warning: ‘%s’ directive writing up to 255 bytes into a region of size 253 [-Wformat-overflow=]
sprintf(ref, "../%s/%s/%s", lbs->name, str, attachment[i] + 14);
^~
src/elogd.c:17841:16: note: ‘sprintf’ output 6 or more bytes (assuming 1760) into a destination of size 256
sprintf(ref, "../%s/%s/%s", lbs->name, str, attachment[i] + 14);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:17976:46: warning: ‘%s’ directive writing up to 1499 bytes into a region of size between 1412 and 1491 [-Wformat-overflow=]
sprintf(str, "%s\" style=\"%s", rowstyle, display);
^~ ~~~~~~~
src/elogd.c:17976:19: note: ‘sprintf’ output between 10 and 1588 bytes into a destination of size 1500
sprintf(str, "%s\" style=\"%s", rowstyle, display);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:18201:36: warning: ‘%s’ directive writing up to 255 bytes into a region of size 253 [-Wformat-overflow=]
sprintf(ref, "../%s/%s/%s", lbs->name, str, attachment[i] + 14);
^~
src/elogd.c:18201:19: note: ‘sprintf’ output 6 or more bytes (assuming 1760) into a destination of size 256
sprintf(ref, "../%s/%s/%s", lbs->name, str, attachment[i] + 14);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:18323:33: warning: ‘%s’ directive writing up to 255 bytes into a region of size 253 [-Wformat-overflow=]
sprintf(ref, "../%s/%s/%s", lbs->name, str, attachment[i] + 14);
^~
src/elogd.c:18323:16: note: ‘sprintf’ output 6 or more bytes (assuming 1760) into a destination of size 256
sprintf(ref, "../%s/%s/%s", lbs->name, str, attachment[i] + 14);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:18381:30: warning: ‘%s’ directive writing up to 255 bytes into a region of size 253 [-Wformat-overflow=]
sprintf(ref, "../%s/%s/%s", lbs->name, str, attachment[index] + 14);
^~
src/elogd.c:18381:13: note: ‘sprintf’ output 6 or more bytes (assuming 1760) into a destination of size 256
sprintf(ref, "../%s/%s/%s", lbs->name, str, attachment[index] + 14);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c: In function ‘show_rss_feed’:
src/elogd.c:19817:31: warning: ‘%s’ directive writing up to 255 bytes into a region of size 249 [-Wformat-overflow=]
sprintf(url, "http://%s", host_name);
^~ ~~~~~~~~~
src/elogd.c:19817:10: note: ‘sprintf’ output between 8 and 263 bytes into a destination of size 256
sprintf(url, "http://%s", host_name);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:19815:32: warning: ‘%s’ directive writing up to 255 bytes into a region of size 248 [-Wformat-overflow=]
sprintf(url, "https://%s", host_name);
^~ ~~~~~~~~~
src/elogd.c:19815:10: note: ‘sprintf’ output between 9 and 264 bytes into a destination of size 256
sprintf(url, "https://%s", host_name);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:19902:41: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size 79 [-Wformat-truncation=]
snprintf(date, sizeof(date) - 1, "%s %+03d%02d", str, (int) (offset / 3600), (int) ((abs((int) offset)
^~ ~~~
src/elogd.c:19902:40: note: directive argument in the range [-596523, 596523]
snprintf(date, sizeof(date) - 1, "%s %+03d%02d", str, (int) (offset / 3600), (int) ((abs((int) offset)
^~~~~~~~~~~~~~
src/elogd.c:19902:40: note: directive argument in the range [0, 59]
src/elogd.c:19902:7: note: ‘snprintf’ output between 7 and 266 bytes into a destination of size 79
snprintf(date, sizeof(date) - 1, "%s %+03d%02d", str, (int) (offset / 3600), (int) ((abs((int) offset)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/ 60) % 60));
~~~~~~~~~~~~
src/elogd.c: In function ‘show_find_form’:
src/elogd.c:12538:40: warning: ‘$’ directive writing 1 byte into a region of size between 0 and 1499 [-Wformat-overflow=]
sprintf(whole_attr, "^%s$", str);
^
src/elogd.c:12538:16: note: ‘sprintf’ output between 3 and 1502 bytes into a destination of size 1500
sprintf(whole_attr, "^%s$", str);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:12496:43: warning: ‘%s’ directive writing up to 1499 bytes into a region of size 1487 [-Wformat-overflow=]
sprintf(str, "Icon comment %s", option);
^~ ~~~~~~
src/elogd.c:12496:16: note: ‘sprintf’ output between 14 and 1513 bytes into a destination of size 1500
sprintf(str, "Icon comment %s", option);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c: In function ‘submit_message’:
src/elogd.c:16089:7: warning: ‘strncpy’ specified bound 256 equals destination size [-Wstringop-truncation]
strncpy(str, strstr(response, "Error: Attribute") + 20, sizeof(str));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c: In function ‘submit_config’:
src/elogd.c:16368:7: warning: ‘strncpy’ specified bound 256 equals destination size [-Wstringop-truncation]
strncpy(str, strstr(response, "Error: Attribute") + 20, sizeof(str));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c: In function ‘synchronize_logbook’:
src/elogd.c:16859:45: warning: ‘%s’ directive writing up to 255 bytes into a region of size 244 [-Wformat-overflow=]
sprintf(loc_ref, "<a href=\".\">%s</a>", lbs->name);
^~
src/elogd.c:16859:13: note: ‘sprintf’ output between 17 and 272 bytes into a destination of size 256
sprintf(loc_ref, "<a href=\".\">%s</a>", lbs->name);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:16857:41: warning: ‘%s’ directive writing up to 255 bytes into a region of size 247 [-Wformat-overflow=]
sprintf(loc_ref, "<a href=\"%s/\">%s</a>", lbs->name_enc, lbs->name);
^~
src/elogd.c:16857:13: note: ‘sprintf’ output between 17 and 527 bytes into a destination of size 256
sprintf(loc_ref, "<a href=\"%s/\">%s</a>", lbs->name_enc, lbs->name);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:16855:44: warning: ‘%s’ directive writing up to 255 bytes into a region of size 244 [-Wformat-overflow=]
sprintf(loc_ref, "<a href=\"../%s/\">%s</a>", lbs->name_enc, lbs->name);
^~
src/elogd.c:16855:13: note: ‘sprintf’ output between 20 and 530 bytes into a destination of size 256
sprintf(loc_ref, "<a href=\"../%s/\">%s</a>", lbs->name_enc, lbs->name);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:17181:50: warning: ‘%s’ directive writing up to 255 bytes into a region of size 247 [-Wformat-overflow=]
sprintf(loc_ref, "<a href=\"%s/%d\">%s</a>", lbs->name_enc, message_id, loc("local"));
^~
src/elogd.c:17181:22: note: ‘sprintf’ output 18 or more bytes (assuming 273) into a destination of size 256
sprintf(loc_ref, "<a href=\"%s/%d\">%s</a>", lbs->name_enc, message_id, loc("local"));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:17179:53: warning: ‘%s’ directive writing up to 255 bytes into a region of size 244 [-Wformat-overflow=]
sprintf(loc_ref, "<a href=\"../%s/%d\">%s</a>", lbs->name_enc, message_id, loc("local"));
^~
src/elogd.c:17179:22: note: ‘sprintf’ output 21 or more bytes (assuming 276) into a destination of size 256
sprintf(loc_ref, "<a href=\"../%s/%d\">%s</a>", lbs->name_enc, message_id, loc("local"));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:17185:54: warning: ‘%s’ directive writing up to 1999 bytes into a region of size 240 [-Wformat-overflow=]
sprintf(rem_ref, "<a href=\"http://%s%d\">%s</a>", str, message_id, loc("remote"));
^~ ~~~
src/elogd.c:17185:19: note: ‘sprintf’ output 24 or more bytes (assuming 2023) into a destination of size 256
sprintf(rem_ref, "<a href=\"http://%s%d\">%s</a>", str, message_id, loc("remote"));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:17256:50: warning: ‘%s’ directive writing up to 255 bytes into a region of size 247 [-Wformat-overflow=]
sprintf(loc_ref, "<a href=\"%s/%d\">%s</a>", lbs->name_enc, message_id,
^~
src/elogd.c:17256:22: note: ‘sprintf’ output 18 or more bytes (assuming 273) into a destination of size 256
sprintf(loc_ref, "<a href=\"%s/%d\">%s</a>", lbs->name_enc, message_id,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
loc("Local entry"));
~~~~~~~~~~~~~~~~~~~
src/elogd.c:17254:53: warning: ‘%s’ directive writing up to 255 bytes into a region of size 244 [-Wformat-overflow=]
sprintf(loc_ref, "<a href=\"../%s/%d\">%s</a>", lbs->name_enc, message_id, loc("local"));
^~
src/elogd.c:17254:22: note: ‘sprintf’ output 21 or more bytes (assuming 276) into a destination of size 256
sprintf(loc_ref, "<a href=\"../%s/%d\">%s</a>", lbs->name_enc, message_id, loc("local"));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:16825:33: warning: ‘%s’ directive writing up to 1999 bytes into a region of size 992 [-Wformat-overflow=]
sprintf(line, "MIRROR: %s", str);
^~
src/elogd.c:17044:31:
mprint(lbs, mode, str);
~~~
src/elogd.c:16825:10: note: ‘sprintf’ output between 9 and 2008 bytes into a destination of size 1000
sprintf(line, "MIRROR: %s", str);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:17501:60: warning: ‘%s’ directive writing up to 1999 bytes into a region of size 240 [-Wformat-overflow=]
sprintf(rem_ref, "<a href=\"http://%s%d\">%s</a>", str, message_id,
^~ ~~~
src/elogd.c:17501:25: note: ‘sprintf’ output 24 or more bytes (assuming 2023) into a destination of size 256
sprintf(rem_ref, "<a href=\"http://%s%d\">%s</a>", str, message_id,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
loc("Remote entry"));
~~~~~~~~~~~~~~~~~~~~
src/elogd.c: In function ‘retrieve_email_from’:
src/elogd.c:3539:44: warning: ‘%s’ directive writing up to 255 bytes into a region of size 245 [-Wformat-overflow=]
sprintf(email_from_name, "ELog <ELog@%s>", host_name);
^~ ~~~~~~~~~
src/elogd.c:3539:7: note: ‘sprintf’ output between 13 and 268 bytes into a destination of size 256
sprintf(email_from_name, "ELog <ELog@%s>", host_name);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:3540:34: warning: ‘%s’ directive writing up to 255 bytes into a region of size 250 [-Wformat-overflow=]
sprintf(email_from, "<ELog@%s>", host_name);
^~ ~~~~~~~~~
src/elogd.c:3540:7: note: ‘sprintf’ output between 8 and 263 bytes into a destination of size 256
sprintf(email_from, "<ELog@%s>", host_name);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:25877:41: warning: ‘%s’ directive writing up to 255 bytes into a region of size 239 [-Wformat-overflow=]
src/elogd.c:3560:53:
get_user_line(lbs, login_name, NULL, NULL, email_from, NULL, NULL, NULL);
~~~~~~~~~~
src/elogd.c:25877:41:
sprintf(str, "/list/user[email=%s]", email);
^~
src/elogd.c:25877:10: note: ‘sprintf’ output between 19 and 274 bytes into a destination of size 256
sprintf(str, "/list/user[email=%s]", email);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:25873:40: warning: ‘%s’ directive writing up to 255 bytes into a region of size 240 [-Wformat-overflow=]
src/elogd.c:3560:29:
get_user_line(lbs, login_name, NULL, NULL, email_from, NULL, NULL, NULL);
~~~~~~~~~~
src/elogd.c:25873:40:
sprintf(str, "/list/user[name=%s]", user);
^~
src/elogd.c:25873:10: note: ‘sprintf’ output between 18 and 273 bytes into a destination of size 256
sprintf(str, "/list/user[name=%s]", user);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:3561:38: warning: ‘ <’ directive writing 2 bytes into a region of size between 1 and 256 [-Wformat-overflow=]
sprintf(email_from_name, "%s <%s>", login_name, email_from);
^~
src/elogd.c:3561:10: note: ‘sprintf’ output between 4 and 514 bytes into a destination of size 256
sprintf(email_from_name, "%s <%s>", login_name, email_from);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c: In function ‘save_user_config’:
src/elogd.c:13400:29: warning: ‘%s’ directive writing up to 255 bytes into a region of size 254 [-Wformat-overflow=]
sprintf(str, "%s \"%s\" %s", loc("Login name"), user_enc, loc("exists already"));
^~ ~~~~~~~~
src/elogd.c:13400:10: note: ‘sprintf’ output 5 or more bytes (assuming 260) into a destination of size 256
sprintf(str, "%s \"%s\" %s", loc("Login name"), user_enc, loc("exists already"));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:13425:34: warning: ‘%s’ directive writing up to 255 bytes into a region of size 240 [-Wformat-overflow=]
sprintf(str, "/list/user[name=%s]", user_enc);
^~ ~~~~~~~~
src/elogd.c:13425:4: note: ‘sprintf’ output between 18 and 273 bytes into a destination of size 256
sprintf(str, "/list/user[name=%s]", user_enc);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:13519:40: warning: ‘%s’ directive writing up to 255 bytes into a region of size 249 [-Wformat-overflow=]
sprintf(url, "http://%s:%d/", http_host, elog_tcp_port);
^~ ~~~~~~~~~
src/elogd.c:13519:19: note: ‘sprintf’ output between 11 and 276 bytes into a destination of size 256
sprintf(url, "http://%s:%d/", http_host, elog_tcp_port);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:13517:41: warning: ‘%s’ directive writing up to 255 bytes into a region of size 248 [-Wformat-overflow=]
sprintf(url, "https://%s:%d/", http_host, elog_tcp_port);
^~ ~~~~~~~~~
src/elogd.c:13517:19: note: ‘sprintf’ output between 12 and 277 bytes into a destination of size 256
sprintf(url, "https://%s:%d/", http_host, elog_tcp_port);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:13514:40: warning: ‘%s’ directive writing up to 255 bytes into a region of size 249 [-Wformat-overflow=]
sprintf(url, "http://%s/", http_host);
^~ ~~~~~~~~~
src/elogd.c:13514:19: note: ‘sprintf’ output between 9 and 264 bytes into a destination of size 256
sprintf(url, "http://%s/", http_host);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:13512:41: warning: ‘%s’ directive writing up to 255 bytes into a region of size 248 [-Wformat-overflow=]
sprintf(url, "https://%s/", http_host);
^~ ~~~~~~~~~
src/elogd.c:13512:19: note: ‘sprintf’ output between 10 and 265 bytes into a destination of size 256
sprintf(url, "https://%s/", http_host);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:13705:30: warning: ‘%s’ directive writing up to 255 bytes into a region of size 253 [-Wformat-overflow=]
sprintf(str, "../%s/", lbs->name_enc);
^~
src/elogd.c:13705:13: note: ‘sprintf’ output between 5 and 260 bytes into a destination of size 256
sprintf(str, "../%s/", lbs->name_enc);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c: In function ‘activate_user’:
src/elogd.c:25877:41: warning: ‘%s’ directive writing up to 255 bytes into a region of size 239 [-Wformat-overflow=]
src/elogd.c:14075:46:
get_user_line(lbs, user_name, NULL, NULL, user_email, NULL, NULL, &inactive);
~~~~~~~~~~
src/elogd.c:25877:41:
sprintf(str, "/list/user[email=%s]", email);
^~
src/elogd.c:25877:10: note: ‘sprintf’ output between 19 and 274 bytes into a destination of size 256
sprintf(str, "/list/user[email=%s]", email);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:14111:40: warning: ‘%s’ directive writing up to 255 bytes into a region of size 249 [-Wformat-overflow=]
sprintf(url, "http://%s:%d/", http_host, elog_tcp_port);
^~ ~~~~~~~~~
src/elogd.c:14111:19: note: ‘sprintf’ output between 11 and 276 bytes into a destination of size 256
sprintf(url, "http://%s:%d/", http_host, elog_tcp_port);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:14109:41: warning: ‘%s’ directive writing up to 255 bytes into a region of size 248 [-Wformat-overflow=]
sprintf(url, "https://%s:%d/", http_host, elog_tcp_port);
^~ ~~~~~~~~~
src/elogd.c:14109:19: note: ‘sprintf’ output between 12 and 277 bytes into a destination of size 256
sprintf(url, "https://%s:%d/", http_host, elog_tcp_port);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:14106:40: warning: ‘%s’ directive writing up to 255 bytes into a region of size 249 [-Wformat-overflow=]
sprintf(url, "http://%s/", http_host);
^~ ~~~~~~~~~
src/elogd.c:14106:19: note: ‘sprintf’ output between 9 and 264 bytes into a destination of size 256
sprintf(url, "http://%s/", http_host);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:14104:41: warning: ‘%s’ directive writing up to 255 bytes into a region of size 248 [-Wformat-overflow=]
sprintf(url, "https://%s/", http_host);
^~ ~~~~~~~~~
src/elogd.c:14104:19: note: ‘sprintf’ output between 10 and 265 bytes into a destination of size 256
sprintf(url, "https://%s/", http_host);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c: In function ‘show_forgot_pwd_page’:
src/elogd.c:25877:41: warning: ‘%s’ directive writing up to 255 bytes into a region of size 239 [-Wformat-overflow=]
src/elogd.c:14173:58:
get_user_line(lbs, login_name, NULL, full_name, user_email, NULL, NULL, NULL);
~~~~~~~~~~
src/elogd.c:25877:41:
sprintf(str, "/list/user[email=%s]", email);
^~
src/elogd.c:25877:10: note: ‘sprintf’ output between 19 and 274 bytes into a destination of size 256
sprintf(str, "/list/user[email=%s]", email);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:25873:40: warning: ‘%s’ directive writing up to 255 bytes into a region of size 240 [-Wformat-overflow=]
src/elogd.c:14173:29:
get_user_line(lbs, login_name, NULL, full_name, user_email, NULL, NULL, NULL);
~~~~~~~~~~
src/elogd.c:25873:40:
sprintf(str, "/list/user[name=%s]", user);
^~
src/elogd.c:25873:10: note: ‘sprintf’ output between 18 and 273 bytes into a destination of size 256
sprintf(str, "/list/user[name=%s]", user);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:14221:44: warning: ‘%s’ directive writing up to 255 bytes into a region of size 243 [-Wformat-overflow=]
sprintf(redir, "?cmd=%s&oldpwd=%s", loc("Change password"), pwd);
^~ ~~~
src/elogd.c:14221:13: note: ‘sprintf’ output 14 or more bytes (assuming 269) into a destination of size 256
sprintf(redir, "?cmd=%s&oldpwd=%s", loc("Change password"), pwd);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:14225:34: warning: ‘%s’ directive writing up to 999 bytes into a region of size 993 [-Wformat-overflow=]
sprintf(str, "?redir=%s&uname=%s&upassword=%s", str2, login_name, pwd);
^~ ~~~~
src/elogd.c:14225:13: note: ‘sprintf’ output between 26 and 1535 bytes into a destination of size 1000
sprintf(str, "?redir=%s&uname=%s&upassword=%s", str2, login_name, pwd);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c: In function ‘show_change_pwd_page’:
src/elogd.c:9011:53: warning: ‘%s’ directive writing up to 255 bytes into a region of size 237 [-Wformat-overflow=]
sprintf(str, "?cmd=%s&config=%s&fail=%s", loc("Change password"), getparam("unm"), error_str);
^~ ~~~~~~~~~
src/elogd.c:9011:16: note: ‘sprintf’ output 20 or more bytes (assuming 275) into a destination of size 256
sprintf(str, "?cmd=%s&config=%s&fail=%s", loc("Change password"), getparam("unm"), error_str);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:9001:47: warning: ‘%s’ directive writing up to 255 bytes into a region of size 241 [-Wformat-overflow=]
sprintf(str, "?cmd=%s&cfg_user=%s", loc("Config"), config);
^~ ~~~~~~
src/elogd.c:9001:16: note: ‘sprintf’ output 16 or more bytes (assuming 271) into a destination of size 256
sprintf(str, "?cmd=%s&cfg_user=%s", loc("Config"), config);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c: In function ‘show_edit_form’:
src/elogd.c:10047:33: warning: ‘%s’ directive writing up to 255 bytes into a region of size 251 [-Wformat-overflow=]
sprintf(page_title, "ELOG %s", lbs->name);
^~
src/elogd.c:10047:7: note: ‘sprintf’ output between 6 and 261 bytes into a destination of size 256
sprintf(page_title, "ELOG %s", lbs->name);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:10721:35: warning: ‘%s’ directive writing up to 9999 bytes into a region of size 248 [-Wformat-overflow=]
sprintf(title, " title=\"%s\"", comment);
^~ ~~~~~~~
src/elogd.c:10721:10: note: ‘sprintf’ output between 10 and 10009 bytes into a destination of size 256
sprintf(title, " title=\"%s\"", comment);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:11189:52: warning: ‘%s’ directive writing up to 9999 bytes into a region of size 9992 [-Wformat-overflow=]
sprintf(tooltip, " title=\"%s\"", comment);
^~ ~~~~~~~
src/elogd.c:11189:25: note: ‘sprintf’ output between 10 and 10009 bytes into a destination of size 10000
sprintf(tooltip, " title=\"%s\"", comment);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:11138:52: warning: ‘%s’ directive writing up to 9999 bytes into a region of size 9992 [-Wformat-overflow=]
sprintf(tooltip, " title=\"%s\"", comment);
^~ ~~~~~~~
src/elogd.c:11138:25: note: ‘sprintf’ output between 10 and 10009 bytes into a destination of size 10000
sprintf(tooltip, " title=\"%s\"", comment);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:11143:52: warning: ‘%s’ directive writing up to 9999 bytes into a region of size 9992 [-Wformat-overflow=]
sprintf(tooltip, " title=\"%s\"", comment);
^~ ~~~~~~~
src/elogd.c:11143:25: note: ‘sprintf’ output between 10 and 10009 bytes into a destination of size 10000
sprintf(tooltip, " title=\"%s\"", comment);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:11958:41: warning: ‘ -format '’ directive writing 10 bytes into a region of size between 1 and 256 [-Wformat-overflow=]
sprintf(cmd, "%s -format '%%wx%%h' '%s'", _identify_cmd, file_name);
^~~~~~~~~~
src/elogd.c:11958:25: note: ‘sprintf’ output between 20 and 530 bytes into a destination of size 256
sprintf(cmd, "%s -format '%%wx%%h' '%s'", _identify_cmd, file_name);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:11956:41: warning: ‘ -format '’ directive writing 10 bytes into a region of size between 1 and 256 [-Wformat-overflow=]
sprintf(cmd, "%s -format '%%wx%%h' '%s[0]'", _identify_cmd, file_name);
^~~~~~~~~~
src/elogd.c:11956:25: note: ‘sprintf’ output between 23 and 533 bytes into a destination of size 256
sprintf(cmd, "%s -format '%%wx%%h' '%s[0]'", _identify_cmd, file_name);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:12022:42: warning: ‘%s’ directive writing up to 2999 bytes into a region of size 256 [-Wformat-overflow=]
sprintf(ref, "%s/%s", str, file_enc);
^~ ~~~
src/elogd.c:12022:28: note: ‘sprintf’ output between 2 and 3256 bytes into a destination of size 256
sprintf(ref, "%s/%s", str, file_enc);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:12008:48: warning: ‘%s’ directive writing up to 2999 bytes into a region of size 256 [-Wformat-overflow=]
sprintf(ref, "%s/%s?thumb=1", str, file_enc);
^~ ~~~
src/elogd.c:12008:34: note: ‘sprintf’ output between 10 and 3264 bytes into a destination of size 256
sprintf(ref, "%s/%s?thumb=1", str, file_enc);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:11991:42: warning: ‘%s’ directive writing up to 2999 bytes into a region of size 256 [-Wformat-overflow=]
sprintf(ref, "%s/%s?thumb=1", str, file_enc);
^~ ~~~
src/elogd.c:11991:28: note: ‘sprintf’ output between 10 and 3264 bytes into a destination of size 256
sprintf(ref, "%s/%s?thumb=1", str, file_enc);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c: In function ‘show_elog_list’:
src/elogd.c:20242:39: warning: ‘%s’ directive writing up to 79 bytes into a region of size 73 [-Wformat-overflow=]
sprintf(mode_cookie, "elmode=%s", mode);
^~ ~~~~
src/elogd.c:20242:10: note: ‘sprintf’ output between 8 and 87 bytes into a destination of size 80
sprintf(mode_cookie, "elmode=%s", mode);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:21574:43: warning: ‘%s’ directive writing up to 1499 bytes into a region of size 249 [-Wformat-overflow=]
sprintf(ref, "?rsort=%s", str);
^~ ~~~
src/elogd.c:21574:22: note: ‘sprintf’ output between 8 and 1507 bytes into a destination of size 256
sprintf(ref, "?rsort=%s", str);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:21576:42: warning: ‘%s’ directive writing up to 1499 bytes into a region of size 250 [-Wformat-overflow=]
sprintf(ref, "?sort=%s", str);
^~ ~~~
src/elogd.c:21576:22: note: ‘sprintf’ output between 7 and 1506 bytes into a destination of size 256
sprintf(ref, "?sort=%s", str);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:21592:38: warning: ‘%s’ directive writing up to 1499 bytes into a region of size 1493 [-Wformat-overflow=]
sprintf(str, "title=\"%s\"", comment);
^~ ~~~~~~~
src/elogd.c:21592:16: note: ‘sprintf’ output between 9 and 1508 bytes into a destination of size 1500
sprintf(str, "title=\"%s\"", comment);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:20066:31: warning: ‘3D’ directive writing 2 bytes into a region of size between 0 and 1499 [-Wformat-overflow=]
sprintf(str, "%s%%3D", param);
^~
src/elogd.c:20066:13: note: ‘sprintf’ output between 4 and 1503 bytes into a destination of size 1500
sprintf(str, "%s%%3D", param);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:20089:31: warning: ‘3D’ directive writing 2 bytes into a region of size between 0 and 1499 [-Wformat-overflow=]
sprintf(str, "%s%%3D", param);
^~
src/elogd.c:20089:13: note: ‘sprintf’ output between 4 and 1503 bytes into a destination of size 1500
sprintf(str, "%s%%3D", param);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c: In function ‘show_elog_entry’:
src/elogd.c:25284:33: warning: ‘%s’ directive writing up to 2999 bytes into a region of size 256 [-Wformat-overflow=]
sprintf(ref, "%s/%s", str, file_enc);
^~ ~~~
src/elogd.c:25284:19: note: ‘sprintf’ output between 2 and 3256 bytes into a destination of size 256
sprintf(ref, "%s/%s", str, file_enc);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:25278:43: warning: ‘%s’ directive writing up to 255 bytes into a region of size between 246 and 247 [-Wformat-overflow=]
sprintf(ref, "cid:att%d@%s", index, domain);
^~ ~~~~~~
src/elogd.c:25278:19: note: ‘sprintf’ output between 10 and 266 bytes into a destination of size 256
sprintf(ref, "cid:att%d@%s", index, domain);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c: In function ‘compose_email’:
src/elogd.c:22630:18: warning: ‘%s’ directive writing up to 1599 bytes into a region of size 256 [-Wformat-overflow=]
sprintf(url, "%s%d", str, message_id);
^~ ~~~
src/elogd.c:22630:4: note: ‘sprintf’ output between 2 and 1611 bytes into a destination of size 256
sprintf(url, "%s%d", str, message_id);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c: In function ‘submit_elog’:
src/elogd.c:23108:33: warning: ‘%d’ directive writing between 1 and 3 bytes into a region of size between 0 and 1499 [-Wformat-overflow=]
sprintf(str, "%s_%d", ua, j);
^~
src/elogd.c:23108:29: note: directive argument in the range [0, 100]
sprintf(str, "%s_%d", ua, j);
^~~~~~~
src/elogd.c:23108:16: note: ‘sprintf’ output between 3 and 1504 bytes into a destination of size 1500
sprintf(str, "%s_%d", ua, j);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:23269:33: warning: ‘%d’ directive writing between 1 and 3 bytes into a region of size between 0 and 1499 [-Wformat-overflow=]
sprintf(str, "%s_%d", ua, j);
^~
src/elogd.c:23269:29: note: directive argument in the range [0, 100]
sprintf(str, "%s_%d", ua, j);
^~~~~~~
src/elogd.c:23269:16: note: ‘sprintf’ output between 3 and 1504 bytes into a destination of size 1500
sprintf(str, "%s_%d", ua, j);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:23647:34: warning: ‘%d’ directive writing between 1 and 10 bytes into a region of size between 0 and 1499 [-Wformat-overflow=]
sprintf(str2, "%s_%d", ua, mindex);
^~
src/elogd.c:23647:30: note: directive argument in the range [0, 2147483647]
sprintf(str2, "%s_%d", ua, mindex);
^~~~~~~
src/elogd.c:23647:16: note: ‘sprintf’ output between 3 and 1511 bytes into a destination of size 1500
sprintf(str2, "%s_%d", ua, mindex);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c: In function ‘do_self_register’:
src/elogd.c:26908:27: warning: ‘%s’ directive writing up to 255 bytes into a region of size 253 [-Wformat-overflow=]
sprintf(str, "../%s/", lbs->name_enc);
^~
src/elogd.c:26908:10: note: ‘sprintf’ output between 5 and 260 bytes into a destination of size 256
sprintf(str, "../%s/", lbs->name_enc);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c: In function ‘show_uploader_finished’:
src/elogd.c:27149:24: warning: ‘%s’ directive writing up to 255 bytes into a region of size between 0 and 255 [-Wformat-overflow=]
sprintf(ref, "%s/%s?lb=%s", str, file_enc, lbs->name_enc);
^~ ~~~~~~~~
src/elogd.c:27149:7: note: ‘sprintf’ output between 6 and 771 bytes into a destination of size 256
sprintf(ref, "%s/%s?lb=%s", str, file_enc, lbs->name_enc);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:27150:30: warning: ‘%s’ directive writing up to 255 bytes into a region of size between 0 and 255 [-Wformat-overflow=]
sprintf(ref_thumb, "%s/%s?lb=%s&thumb=1", str, file_enc, lbs->name_enc);
^~ ~~~~~~~~
src/elogd.c:27150:7: note: ‘sprintf’ output between 14 and 779 bytes into a destination of size 256
sprintf(ref_thumb, "%s/%s?lb=%s&thumb=1", str, file_enc, lbs->name_enc);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c: In function ‘interprete’:
src/elogd.c:28378:27: warning: ‘%s’ directive writing up to 1499 bytes into a region of size 1495 [-Wformat-overflow=]
sprintf(str1, "?cmd=%s", str);
^~ ~~~
src/elogd.c:28378:7: note: ‘sprintf’ output between 6 and 1505 bytes into a destination of size 1500
sprintf(str1, "?cmd=%s", str);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:28382:27: warning: ‘%s’ directive writing up to 1499 bytes into a region of size 1495 [-Wformat-overflow=]
sprintf(str2, "?cmd=%s", str);
^~ ~~~
src/elogd.c:28382:7: note: ‘sprintf’ output between 6 and 1505 bytes into a destination of size 1500
sprintf(str2, "?cmd=%s", str);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:28177:31: warning: ‘%s’ directive writing up to 1499 bytes into a region of size 1495 [-Wformat-overflow=]
sprintf(str, "%s: <b>%s</b>", loc("Invalid URL"), str2);
^~ ~~~~
src/elogd.c:28177:10: note: ‘sprintf’ output 10 or more bytes (assuming 1509) into a destination of size 1500
sprintf(str, "%s: <b>%s</b>", loc("Invalid URL"), str2);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:27649:28: warning: ‘%s’ directive writing up to 1499 bytes into a region of size 1495 [-Wformat-overflow=]
sprintf(str, "%s: <b>%s</b>", loc("Invalid URL"), str2);
^~ ~~~~
src/elogd.c:27649:7: note: ‘sprintf’ output 10 or more bytes (assuming 1509) into a destination of size 1500
sprintf(str, "%s: <b>%s</b>", loc("Invalid URL"), str2);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c: In function ‘decode_post’:
src/elogd.c:28615:54: warning: ‘%s’ directive writing up to 1499 bytes into a region of size 1483 [-Wformat-overflow=]
sprintf(str, "Error: Filename \"%s\" contains invalid character", str2);
^~ ~~~~
src/elogd.c:28615:22: note: ‘sprintf’ output between 46 and 1545 bytes into a destination of size 1500
sprintf(str, "Error: Filename \"%s\" contains invalid character", str2);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
gcc -O3 -funroll-loops -fomit-frame-pointer -W -Wall -Wno-deprecated-declarations -Imxml -DHAVE_SSL -o elconv src/elconv.c -lssl
src/elconv.c: In function ‘ss_file_find’:
src/elconv.c:233:10: warning: ‘strncpy’ output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation]
strncpy(*plist + (i * MAX_PATH_LENGTH), dp->d_name, strlen(dp->d_name));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elconv.c: In function ‘el_search_message’:
src/elconv.c:325:32: warning: ‘%02d’ directive writing between 2 and 3 bytes into a region of size between 1 and 256 [-Wformat-overflow=]
sprintf(file_name, "%s%02d%02d%02d.log", dir, tms->tm_year % 100, tms->tm_mon + 1, tms->tm_mday);
^~~~
src/elconv.c:325:29: note: directive argument in the range [-99, 99]
sprintf(file_name, "%s%02d%02d%02d.log", dir, tms->tm_year % 100, tms->tm_mon + 1, tms->tm_mday);
^~~~~~~~~~~~~~~~~~~~
src/elconv.c:325:29: note: directive argument in the range [-2147483647, 2147483647]
src/elconv.c:325:10: note: ‘sprintf’ output between 11 and 285 bytes into a destination of size 256
sprintf(file_name, "%s%02d%02d%02d.log", dir, tms->tm_year % 100, tms->tm_mon + 1, tms->tm_mday);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elconv.c:419:32: warning: ‘%06d’ directive writing 6 bytes into a region of size between 1 and 256 [-Wformat-overflow=]
sprintf(file_name, "%s%06d.log", dir, max % 1000000);
^~~~
src/elconv.c:419:29: note: directive argument in the range [0, 999999]
sprintf(file_name, "%s%06d.log", dir, max % 1000000);
^~~~~~~~~~~~
src/elconv.c:419:10: note: ‘sprintf’ output between 11 and 266 bytes into a destination of size 256
sprintf(file_name, "%s%06d.log", dir, max % 1000000);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elconv.c:388:32: warning: ‘%06d’ directive writing between 6 and 7 bytes into a region of size between 1 and 256 [-Wformat-overflow=]
sprintf(file_name, "%s%06d.log", dir, min % 1000000);
^~~~
src/elconv.c:388:29: note: directive argument in the range [-999999, 999999]
sprintf(file_name, "%s%06d.log", dir, min % 1000000);
^~~~~~~~~~~~
src/elconv.c:388:10: note: ‘sprintf’ output between 11 and 267 bytes into a destination of size 256
sprintf(file_name, "%s%06d.log", dir, min % 1000000);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elconv.c: In function ‘el_submit’:
src/elconv.c:626:38: warning: ‘%02d’ directive writing between 2 and 3 bytes into a region of size between 1 and 256 [-Wformat-overflow=]
sprintf(file_name, "%s%02d%02d%02d_%02d%02d%02d_%s", dir,
^~~~
src/elconv.c:626:35: note: directive argument in the range [-99, 99]
sprintf(file_name, "%s%02d%02d%02d_%02d%02d%02d_%s", dir,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elconv.c:626:35: note: directive argument in the range [-2147483647, 2147483647]
src/elconv.c:626:16: note: ‘sprintf’ output between 15 and 571 bytes into a destination of size 256
sprintf(file_name, "%s%02d%02d%02d_%02d%02d%02d_%s", dir,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tms->tm_year % 100, tms->tm_mon + 1, tms->tm_mday, tms->tm_hour,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tms->tm_min, tms->tm_sec, str);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elconv.c:690:29: warning: ‘%02d’ directive writing between 2 and 3 bytes into a region of size between 1 and 256 [-Wformat-overflow=]
sprintf(file_name, "%s%02d%02d%02d.log", dir, tms->tm_year % 100, tms->tm_mon + 1, tms->tm_mday);
^~~~
src/elconv.c:690:26: note: directive argument in the range [-99, 99]
sprintf(file_name, "%s%02d%02d%02d.log", dir, tms->tm_year % 100, tms->tm_mon + 1, tms->tm_mday);
^~~~~~~~~~~~~~~~~~~~
src/elconv.c:690:26: note: directive argument in the range [-2147483647, 2147483647]
src/elconv.c:690:7: note: ‘sprintf’ output between 11 and 285 bytes into a destination of size 256
sprintf(file_name, "%s%02d%02d%02d.log", dir, tms->tm_year % 100, tms->tm_mon + 1, tms->tm_mday);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elconv.c:656:29: warning: ‘%s’ directive writing up to 255 bytes into a region of size between 1 and 256 [-Wformat-overflow=]
sprintf(file_name, "%s%s.log", dir, str);
^~ ~~~
src/elconv.c:656:7: note: ‘sprintf’ output between 5 and 515 bytes into a destination of size 256
sprintf(file_name, "%s%s.log", dir, str);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elconv.c: In function ‘scan_messages’:
src/elconv.c:981:29: warning: ‘%s’ directive writing up to 255 bytes into a region of size between 1 and 256 [-Wformat-overflow=]
sprintf(file_name, "%s%sa.log", data_dir, str);
^~ ~~~
src/elconv.c:981:7: note: ‘sprintf’ output between 6 and 516 bytes into a destination of size 256
sprintf(file_name, "%s%sa.log", data_dir, str);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Andreas Luedeke wrote: |
Stefan said "code is commited": that means you can download the latest version from https://bitbucket.org/ritt/elog, as described in https://elog.psi.ch/elog/download.html, and then compile it. Clear now?
Stefan Ritt wrote: |
This warning is triggered by the use of the sprintf() funciton, which can write beyond the boundary of the destination string. I replaced it by snprintf(), which should make the compiler happy. Code is committed. Unfortuantely I have no FC27 here, so if there is still some waring with the current code, please post the full warning list here.
Stefan
|
|
|
|