Linux-RTC Archive on lore.kernel.org
 help / color / Atom feed
* Potential uninitialized variables in rtc: ds1343
@ 2019-10-10  0:36 Yizhuo Zhai
  0 siblings, 0 replies; only message in thread
From: Yizhuo Zhai @ 2019-10-10  0:36 UTC (permalink / raw)
  To: Alessandro Zummo, Alexandre Belloni, linux-rtc, linux-kernel,
	Zhiyun Qian, Chengyu Song

Hi All:
drivers/rtc/rtc-ds1343.c:
Inside function ds1343_show_glitchfilter(), variable "data" could be
uninitialized if regmap_read() returns -EINVAL. However,"data"
is used later in the if statement, which is potentially unsafe. Patch
for this case is hard since the return value -EINVAL is unacceptable
for ds1343_show_glitchfilter().

-- 
Kind Regards,

Yizhuo Zhai

Computer Science, Graduate Student
University of California, Riverside

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

only message in thread, back to index

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-10  0:36 Potential uninitialized variables in rtc: ds1343 Yizhuo Zhai

Linux-RTC Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-rtc/0 linux-rtc/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-rtc linux-rtc/ https://lore.kernel.org/linux-rtc \
		linux-rtc@vger.kernel.org linux-rtc@archiver.kernel.org
	public-inbox-index linux-rtc

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-rtc


AGPL code for this site: git clone https://public-inbox.org/ public-inbox