Skip to content

radv: memset the alignment hole in cache_entry to 0

Witold Baryluk requested to merge baryluk/mesa:baryluk-master-patch-89021 into master

Detected using valgrind. Otherwise these bytes at the end will be touched by zstd compression, spamming valgrind output.

Also we don't want some random data to be leaking to disk cache, which could be in esoteric circumstance be a security issue.

Other option is to do full memset(entry, 0, size), but that is somehow unnecessary and suboptimal.

FYI. It is perfectly legal to call memset with size==0, as long the pointer is a valid one (including one past the allocated buffer), so there is no need to handle that separately.

Edited by Witold Baryluk

Merge request reports