bugGNU FreeIPMI - Bugs: bug #37295, ipmiseld-common.c:160:5: error:...

 
 

bug #37295: ipmiseld-common.c:160:5: error: format not a string literal and no format arguments [-Werror=format-security]

Submitter:  Claudio Cesar Sanchez Tejeda <demonccc>
Submitted:  Fri 07 Sep 2012 12:05:58 PM UTC
   
 
Category:  None Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Installation Problem
Status:  None Privacy:  Public
Assigned to:  None Open/Closed:  Closed
Operating System:  GNU/Linux
* Mandatory Fields

Add a New Comment Rich Markup
   

Fri 07 Sep 2012 06:04:44 PM UTC, comment #1: 

Thanks for the patch, it'll be in the next release of FreeIPMI.

Albert Chu <chu11>
Group administrator
Fri 07 Sep 2012 12:05:58 PM UTC, original submission:  


I debianized the new version of freeipmi (1.2.1) and upload it to launchpad.net in order to create a new deb package for my PPA.

Launchpad sent me a email informing me that the build failed with the following error:

Making all in ipmiseld
make[2]: Entering directory `/build/buildd/freeipmi-1.2.1/ipmiseld'
gcc -DHAVE_CONFIG_H -I. -I../config  -I../common/toolcommon -I../common/miscutil -I../common/parsecommon -I../common/portability -I../libfreeipmi/include -I../libfreeipmi/include -D_GNU_SOURCE -D_REENTRANT -DIPMISELD_LOCALSTATEDIR='"/var"' -D_FORTIFY_SOURCE=2  -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security -c -o ipmiseld-ipmiseld.o `test -f 'ipmiseld.c' || echo './'`ipmiseld.c
gcc -DHAVE_CONFIG_H -I. -I../config  -I../common/toolcommon -I../common/miscutil -I../common/parsecommon -I../common/portability -I../libfreeipmi/include -I../libfreeipmi/include -D_GNU_SOURCE -D_REENTRANT -DIPMISELD_LOCALSTATEDIR='"/var"' -D_FORTIFY_SOURCE=2  -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security -c -o ipmiseld-ipmiseld-argp.o `test -f 'ipmiseld-argp.c' || echo './'`ipmiseld-argp.c
gcc -DHAVE_CONFIG_H -I. -I../config  -I../common/toolcommon -I../common/miscutil -I../common/parsecommon -I../common/portability -I../libfreeipmi/include -I../libfreeipmi/include -D_GNU_SOURCE -D_REENTRANT -DIPMISELD_LOCALSTATEDIR='"/var"' -D_FORTIFY_SOURCE=2  -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security -c -o ipmiseld-ipmiseld-cache.o `test -f 'ipmiseld-cache.c' || echo './'`ipmiseld-cache.c
gcc -DHAVE_CONFIG_H -I. -I../config  -I../common/toolcommon -I../common/miscutil -I../common/parsecommon -I../common/portability -I../libfreeipmi/include -I../libfreeipmi/include -D_GNU_SOURCE -D_REENTRANT -DIPMISELD_LOCALSTATEDIR='"/var"' -D_FORTIFY_SOURCE=2  -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security -c -o ipmiseld-ipmiseld-common.o `test -f 'ipmiseld-common.c' || echo './'`ipmiseld-common.c
ipmiseld-common.c: In function '_ipmiseld_syslog':
ipmiseld-common.c:160:5: error: format not a string literal and no format arguments [-Werror=format-security]
cc1: some warnings being treated as errors
make[2]: * [ipmiseld-ipmiseld-common.o] Error 1
make[2]: Leaving directory `/build/buildd/freeipmi-1.2.1/ipmiseld'
make[1]: * [all-recursive] Error 1
make[1]: Leaving directory `/build/buildd/freeipmi-1.2.1'
dh_auto_build: make -j1 returned exit code 2
make: * [build] Error 2
dpkg-buildpackage: error: debian/rules build gave error exit status 2

The line that has the issue is:

syslog (host_data->prog_data->log_priority, buf);

I researched about the syslog function and I found that the correct way to use it is:

syslog(priority, "%s", string);

Regards.

Claudio Cesar Sanchez Tejeda <demonccc>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #26493:  ipmiseld-common.c.patch added by demonccc (605B - text/x-patch - I attached a patch that resolve this issue.)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by chu11 (Posted a comment)
  • -email is unavailable- added by demonccc (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2012-09-07 chu11 Open/ClosedOpen Closed
    2012-09-07 demonccc Attached File- Added ipmiseld-common.c.patch, #26493

    Back to the top

    Powered by Savane 3.13-caa5.
    Corresponding source code