Dear Maintainer, Version 3.3.0 of Dillo does not currently build on GNU/hurd due to the macro PATH_MAX not being defined on that platform. The attached patch addresses the problem. Best regards, Joao
Hi! The patch calls snprintf() to get the resulting formatted string length, but does not check for error values. It then uses the unchecked returned length for a VLA, which tends to be a controversial usage, as that allocates a potentially arbitrary size from the stack (with no easy way to check for errors), and where I'm not sure the dillo project might have policies against its use. I'd tend to default to allocating on the heap on these cases. The second snprintf() also is not being checked for errors (which would be unlikely if the first one succeeded, but personally I'd check them anyway out of defensive programming). The patch is also attributed to the package maintainer which seems suspect, and the boilerplate patch metadata seems in need of an update. Thanks, Guillem
Hello Guillem, Many thanks for your comments, and apologies for leaving all the dpkg-source --commit boilerplate on the original patch. I have reworked the patch. Best regards, João
Hello, João Pedro Malhado, le lun. 31 août 2026 13:32:27 +0100, a ecrit: If you are to malloc, better simply use asprintf ;) Samuel
Hi, Thanks for looking into this. It looks like this was addressed upstream here by the Dillo maintainer: https://git.dillo-browser.org/dillo/commit/?id=b43ab26e81a1e399e3cb148b972a284518aa4d39 If this simpler upstream patch doesn't fully resolve the Hurd build failure we can certainly resolve that in a custom debian patch as well. Even then, these patches could be forwarded upstream. Nik
Hello Nik, Thank you for getting back to me. That commit will make the code build on the hurd, but it is not the preferred way to handle this type of issues, and dynamic allocation is preferred https://www.gnu.org/software/hurd/faq/foo_max Would upstream consider a different approach? Best regards, João
Oh interesting - yes, I think upstream would be very open to your alternative patch here seeing as this is actually best practice, though maybe not as convenient, as pointed out here: https://www.gnu.org/software/hurd/faq/foo_max I suggest opening a discussion on this on the dillo-dev mailing list here: https://lists.mailman3.com/hyperkitty/list/dillo-dev@mailman3.com/ With your proposed patch.