]> git.ipfire.org Git - thirdparty/rsync.git/commit
zero all new memory from allocations
authorAndrew Tridgell <andrew@tridgell.net>
Wed, 22 Apr 2026 00:59:11 +0000 (10:59 +1000)
committerAndrew Tridgell <andrew@tridgell.net>
Wed, 22 Apr 2026 01:44:10 +0000 (11:44 +1000)
commitd046525de39315d625ffaef4fdd6e7cf12148016
tree04582e6bbc228de8a0b91dc8b1c0a147f3178278
parentbb0a8118c2d2ab01140bac5e4e327e5e1ef90c9c
zero all new memory from allocations

Change my_alloc() to use calloc instead of malloc so all fresh
allocations return zeroed memory. Also zero the expanded portion
in expand_item_list() after realloc, since it knows both old and
new sizes. This gives more predictable behaviour in case of bugs
where uninitialised or stale memory is accidentally accessed.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
util1.c
util2.c