← Back to team overview

kicad-developers team mailing list archive

Re: [PATCHES] misc minor fixes

 

Le 17/01/2015 21:25, Mark Roszko a écrit :
> This fixes come from running static analysis on kicad using Coverity while
> trying to hunt something down.
> 
> 
> 1 - fgetc in 3d-viewer/vrml_aux.cpp had it's return type used as char but
> libc defines it as int. EOF can be -1 (32-bit signed) and thus would get
> truncated. This is OS dependent.
> 2 - The error path in bitmap2componenet exits early on error without
> freeing allocated memory
> 3 - GetStyleCodeIndex can get negative (wX_NOT_FOUND) returned. Check the
> value before trying to access an array using it.
> 4 - Two strncpy calls that didn't have their buffers null terminated.
> (strncpy won't set null if bytes available > limit).


Committed. Thanks.



-- 
Jean-Pierre CHARRAS


References