mirror of
https://git.FreeBSD.org/src.git
synced 2024-11-25 07:49:18 +00:00
Zero struct before reading from it
PR: 140384 Found by: clang static analyzer MFC after: 3 weeks
This commit is contained in:
parent
ccf87a1089
commit
c5d27505b6
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=208730
@ -1072,6 +1072,7 @@ find_element(char *voltag, uint16_t *et, uint16_t *eu)
|
||||
|
||||
/* Read in the changer slots */
|
||||
if (cp.cp_nslots > 0) {
|
||||
(void) memset(&cesr, 0, sizeof(cesr));
|
||||
cesr.cesr_element_type = CHET_ST;
|
||||
cesr.cesr_element_base = 0;
|
||||
cesr.cesr_element_count = cp.cp_nslots;
|
||||
|
Loading…
Reference in New Issue
Block a user