[Bugme-janitors] [Bug 9564] New: Uninitialzed variable fields
cvt.h_margin and cvt.v_margin
bugme-daemon at bugzilla.kernel.org
bugme-daemon at bugzilla.kernel.org
Fri Dec 14 13:54:59 PST 2007
http://bugzilla.kernel.org/show_bug.cgi?id=9564
Summary: Uninitialzed variable fields cvt.h_margin and
cvt.v_margin
Product: Drivers
Version: 2.5
KernelVersion: 2.6.23
Platform: All
OS/Version: Linux
Tree: Mainline
Status: NEW
Severity: normal
Priority: P1
Component: Video(Other)
AssignedTo: drivers_video-other at kernel-bugs.osdl.org
ReportedBy: marciobuss at gmail.com
The errors can be found at drivers/video/fbcvt.c as follows:
(1) the test "if (margin)" at line 310 evaluates to false,
(2) this makes the test "if (cvt.flags & FB_CVT_FLAG_MARGINS)" at line 352
to evaluate to false as well
(3) now cvt.h_margin is uninitialized at line 359, 368, and 370, and
cvt.v_margin is uninitizalied at line 371.
In other words, both cvt.v_margin and cvt.h_margin are initialized conditinally
but used unconditionally. This bug is a false positive only if the parameter
"margins" at line 304 is never 0. However, this would make the test at line
310 unnecessary -- anyone looking at the code is miled into believing that
0 is a legal value for "margins". This means the code does require some change
in my humble opinion.
--
Configure bugmail: http://bugzilla.kernel.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
More information about the Bugme-janitors
mailing list