rasdaemon: ARM: fully initialize ras_arm_event
Issue found by covscan:
1. rasdaemon-0.4.1/ras-arm-handler.c:32: var_decl: Declaring variable "ev" without initializer.
16. rasdaemon-0.4.1/ras-arm-handler.c:81: uninit_use_in_call: Using uninitialized value "ev.error_count" when calling "ras_store_arm_record".
23. rasdaemon-0.4.1/ras-record.c:243:2: read_parm_fld: Reading a parameter field.
Signed-off-by Aristeu Rozanski <[email protected]>
---
To unsubscribe from this list: send the line "unsubscribe linux-edac" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
ras-arm-handler.c +2 -0
@@ -31,6 +31,8 @@ int ras_arm_event_handler(struct trace_seq *s,struct tm *tm;struct ras_arm_event ev; +memset (&ev,0 ,sizeof (ev)); +/* * Newer kernels (3.10-rc1 or upper) provide an uptime clock. * On previous kernels, the way to properly generate an event would