[gnutls-devel] GnuTLS | Fix out-of-bounds memcpy in gnutls_realloc_zero() (!1592)
Read-only notification of GnuTLS library development activities
gnutls-devel at lists.gnutls.org
Wed May 18 13:46:15 CEST 2022
Zoltán Fridrich commented on a discussion: https://gitlab.com/gnutls/gnutls/-/merge_requests/1592#note_951061844
I think that with `if (d < old_size / 2)` condition you might never actually free unused memory leading to much higher memory consumption. If you had a program that allocates a huge chunk of memory then it starts shrinking it with realloc but never halving its size, you would never free the unused memory because we don't have the same info as an actual realloc, ie. the actual size of currently allocated memory.
Reply to this email directly or view it on GitLab: https://gitlab.com/gnutls/gnutls/-/merge_requests/1592#note_951061844
You're receiving this email because of your account on gitlab.com.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Gnutls-devel