[Sound-open-firmware] [PATCH] trace: don't copy uninitialized field from dma_sw_elem parameter

Liam Girdwood liam.r.girdwood at linux.intel.com
Mon Jan 22 13:24:41 CET 2018


On Fri, 2018-01-19 at 16:33 -0600, Pierre-Louis Bossart wrote:
> Coverity issue: 254842 Uninitialized scalar variable
> The variable will contain an arbitrary value left from earlier
> computations.
> 
> In parse_page_descriptors: Use of an uninitialized variable (CWE-457)
> The elem.src variable is not initialized, but in
> dma_trace_host_buffer() the code reads this initialized value.
> 
> Break
> 
> 	*e = *elem;
> 
> in
> 	e->dest = elem->dest;
> 	e->size = elem->size;
> 
> to only access relevant fields.
> 
> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart at linux.intel
> .com>
> 
Applied.

Thanks

Liam


More information about the Sound-open-firmware mailing list