Bug 169287
Summary: | program reads uninited local variable | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | David Binderman <dcb314> |
Component: | qt | Assignee: | Than Ngo <than> |
Status: | CLOSED UPSTREAM | QA Contact: | Ben Levenson <benl> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | rawhide | ||
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2005-09-27 11:13:47 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
David Binderman
2005-09-26 16:29:28 UTC
which gcc version have you used here? I cannot reproduce it here with gcc-4.0.1-14. Taken a look at the source, the error is initialized before using if ( gdef->GlyphClassDef.loaded ) { error = Get_Class( &gdef->GlyphClassDef, glyphID, &klass, &index ); if ( error && error != TTO_Err_Not_Covered ) return error; } else { klass = 0; index = 0; } /* we don't accept glyphs covered in `GlyphClassDef' */ if ( !error ) return TTO_Err_Not_Covered; >which gcc version have you used here? The one that is standard in FC4. I think it is gcc 4.0.0 >I cannot reproduce it here The error is obvious by visual inspection. Please try again. >the error is initialized before using Local variable "error" is only initialise under some, not all, execution paths. Suggest initialise "error" on _all_ execution paths. Hm, by visual inspection the local variable "error" is always initialised here if condition gdef->GlyphClassDef.loaded is true! if ( gdef->GlyphClassDef.loaded ) { error = Get_Class( &gdef->GlyphClassDef, glyphID, &klass, &index ); >local variable "error" is always initialised
What happens if gdef->GlyphClassDef.loaded is false ?
I suggest again to have another look.
Both I and the compiler think there are execution paths where "error"
is not initialised.
yes, it's obviously that "error" is not initialised before using. Sorry i have been blind! ok, it seems that this 3dparty code is not used by default. I have already sent the fix to trolltech for including in next upstream release. Thanks for your report. |