[zlib] Deflate: move zmemzero after NULL check
ZALLOC() might fail, in which case dereferencing the returned pointer
results in undefined behaviour. N.B. These conditions are not reachable
from Chromium, as Chromium will abort rather than return nullptr from
malloc. Found by libfido2's fuzz_largeblob harness.
Bug: 407832330
Change-Id: I62a4100cf2cdd0c0f580e27c64b16c70d084c830
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6430541
Reviewed-by: Hans Wennborg <hans@chromium.org>
Reviewed-by: Adenilson Cavalcanti <cavalcantii@chromium.org>
Commit-Queue: Hans Wennborg <hans@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1445131}
NOKEYCHECK=True
GitOrigin-RevId: 3d4d5701ea678f30591177c25341447da7613d54
2 files changed