LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [BUG] video: fbdev: sis: possible uninitialized-variable access in SiS_SetCRT2FIFO_300()
@ 2021-07-31  6:28 Li Tuo
  0 siblings, 0 replies; only message in thread
From: Li Tuo @ 2021-07-31  6:28 UTC (permalink / raw)
  To: thomas; +Cc: dri-devel, linux-fbdev, linux-kernel, baijiaju1990

Hello,

Our static analysis tool finds a possible uninitialized-variable access 
in the sis driver in Linux 5.14.0-rc3:

At the beginning of the function SiS_SetCRT2FIFO_300(), the variable 
modeidindex is not initialized.
If the following conditions are false, it remains uninitialized.
5346:    if(!SiS_Pr->CRT1UsesCustomMode)
5438:    if(!SiS_Pr->UseCustomMode)

But it is accessed at:
5466:    colorth = SiS_GetColorDepth(SiS_Pr,CRT2ModeNo,modeidindex) >> 1;

I am not quite sure whether this possible uninitialized-variable access 
is real and how to fix it if it is real.
Any feedback would be appreciated, thanks!

Reported-by: TOTE Robot <oslab@tsinghua.edu.cn>

Best wishes,
Tuo Li

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-07-31  6:28 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-31  6:28 [BUG] video: fbdev: sis: possible uninitialized-variable access in SiS_SetCRT2FIFO_300() Li Tuo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).