[gnutls-devel] GnuTLS | Allocate pathname on heap instead of on stack (!1493)

Read-only notification of GnuTLS library development activities gnutls-devel at lists.gnutls.org
Fri Dec 10 16:51:18 CET 2021

Daiki Ueno commented on a discussion: https://gitlab.com/gnutls/gnutls/-/merge_requests/1493#note_763824715

It was considered; see the description of this MR and the linked comment to Gnulib's maint.mk, which I'm expanding it for handy:
# Even if you use pathmax.h to guarantee that PATH_MAX is defined, it might
# not be constant, or might overflow a stack.  In general, use PATH_MAX as
# a limit, not an array or alloca size.
	@prohibit='(\balloca *\([^)]*|\[[^]]*)\bPATH_MAX'		\
	halt='Avoid stack allocations of size PATH_MAX'			\
So if we go that way, you will get the error at `make syntax-check`.

Reply to this email directly or view it on GitLab: https://gitlab.com/gnutls/gnutls/-/merge_requests/1493#note_763824715
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/20211210/90f48314/attachment.html>

More information about the Gnutls-devel mailing list