Hello Michael, On Sun, Sep 23, 2012 at 12:41:02AM +0100, Michael Tautschnig wrote: > Package: asclock > Version: 2.0.12-23 > > While building your package using our research compiler infrastructure we > noticed the following conflicting declarations: > > ./asclock.h:extern char exec_str[MAX_PATH_LEN]; > ./asclock.c:char exec_str[] = "echo no program has been specified > >/dev/console";
In wich sense are they conflicting? I just checked: asclock.c: ========== ... #include "asclock.h" --> extern char exec_str[MAX_PATH_LEN]; --> Variable is defined with maximum length (see below for reason) … char exec_str[] = "echo no program has been specified >/dev/console"; --> Variable is initialized to this value (see below for a reason) int main(int argc,char *argv[]) … parseArgs(argc, argv); --> strcpy(exec_str, argv[i]); strcat(exec_str, " &"); --> If option "-e" is provided, this is read as it is from the command line, the program specified could be fully qualified, hence it could be up to max path length long. … system(exec_str); At this point, either the default string (no program) or the one provided on the command line are used. > This may cause undefined behaviour (likely a segfault) if any part of the > program relies on the fact that exec_str is of size MAX_PATH_LEN, while only > 50 > bytes are actually allocated. I don't see this, see above. Further the only usage of this variable is for calling "system", i.e. no further internal usage. Hence there is no bug. Greetings Helge -- Dr. Helge Kreutzmann deb...@helgefjell.de Dipl.-Phys. http://www.helgefjell.de/debian.php 64bit GNU powered gpg signed mail preferred Help keep free software "libre": http://www.ffii.de/
signature.asc
Description: Digital signature