[gnutls-devel] GnuTLS | build: avoid potential integer overflow in array allocation (!1392)

Read-only notification of GnuTLS library development activities gnutls-devel at lists.gnutls.org
Tue Mar 30 13:51:13 CEST 2021




Daiki Ueno commented on a discussion on lib/mem.h: https://gitlab.com/gnutls/gnutls/-/merge_requests/1392#note_540986223

>  
>  #include <config.h>
>  
> -/* this realloc function will return ptr if size==0, and
> - * will free the ptr if the new allocation failed.
> +/* These realloc functions will return ptr if size==0, and will free
> + * the ptr if the new allocation failed.
>   */
>  void *gnutls_realloc_fast(void *ptr, size_t size);
> +void *_gnutls_reallocarray_fast(void *ptr, size_t nmemb, size_t size);
>  
>  void *_gnutls_calloc(size_t nmemb, size_t size);

Well spotted, thanks!

-- 
Reply to this email directly or view it on GitLab: https://gitlab.com/gnutls/gnutls/-/merge_requests/1392#note_540986223
You're receiving this email because of your account on gitlab.com.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.gnupg.org/pipermail/gnutls-devel/attachments/20210330/f82f79a4/attachment.html>


More information about the Gnutls-devel mailing list