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]

Submitted by:  Claudio Cesar Sanchez Tejeda <demonccc>
Submitted on:  Fri 07 Sep 2012 12:05:58 PM UTC  
 
Category: NoneSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Installation Problem
Status: NonePrivacy: Public
Assigned to: NoneOpen/Closed: Closed
Operating System: GNU/Linux

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

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>
Project 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 File(s):
   
   
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
  • -unavailable- added by chu11 (Posted a comment)
  • -unavailable- added by demonccc (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Fri 07 Sep 2012 06:22:58 PM UTCchu11Open/ClosedOpen=>Closed
    Fri 07 Sep 2012 12:16:19 PM UTCdemoncccAttached File-=>Added ipmiseld-common.c.patch, #26493

    Back to the top


    Powered by Savane 3.1-cleanup1