—Jens 

> On Dec 12, 2019, at 11:23 AM, Warren Young <war...@etr-usa.com> wrote:
> 
> I wouldn’t dismiss this warning

I wouldn’t dismiss a warning about the full scenario. (In fact I wasn’t aware 
that assignment to a field might overwrite pad bytes; that’s good to know.)

But warning about every call to memset is counterproductive, because it’s much 
too noisy. Memset is used often in situations other than zeroing padded 
structures. There are common ways to zero structs that don’t involve memset— 
like initializing it with “= {}” or using calloc to allocate one on the heap. 
And probably 99% of the time a struct is zeroed, it’s not going to be passed 
across a trust boundary.

It’s kind of like your mom warning you every time you get on your bike, because 
one time a kid rode their bike up to the old quarry and went swimming and 
drowned.

—Jens
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to