Red Hat Bugzilla – Bug 111190
reading uninitialised data
Last modified: 2007-11-30 17:10:34 EST
Description of problem:
I just tried to compile package redhat-config-securitylevel-1.2.11-1
The compiler said
lokkit.c(249): remark #592: variable "ret" is used before its value is set
The source code is
/* more code */
ret = calloc((orig ? strlen(orig) : 0) + strlen(ret) + 2, sizeof(char));
Suggest initialise ret before use.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
Did the program finish compiling or did the build not finish?
>Did the program finish compiling or did the build not finish?
I don't understand how this matters. The program has an "easily
detectable at compile time" bug in it.
Doing strlen( ret), where ret is uninitialised, is certainly
a run time problem.
I think the bug needs fixing, independent of the compile
finishing or not.
My question is simple. Is the message you are seeing a compiler
warning or a compiler error?
This code has not changed in _years_ and we know that lokkit works.
If all you are seeing is a compiler warning that does not prevent the
program from working properly, then there are many other higher
priority bugs that deserve more attention than this one.
>compiler warning or a compiler error?
Like it says in the text, it's a remark.
If ignore compiler warnings & remarks, then you have a deeply
flawed development process.
>This code has not changed in _years_ and we know that lokkit works.
>many other higher priority bugs that deserve more attention than
The code is still broken. Any exeucution of this code is almost
certain to cause a run time crash.
All I'm trying to do is assess the severity of the problem and you're
being belligerent about it. I'm less inclined to help you.
If you want to harp on compiler warnings, go compile a kernel and
watch the hundreds of warnings scroll by.
>The code is still broken. Any exeucution of this code is almost
>certain to cause a run time crash.
Show me a run time crash and then I'll consider this a bug.