#1146261 dillo: FTBFS on hurd (undefined PATH_MAX)

Package:
dillo
Source:
dillo
Description:
Small and fast web browser
Submitter:
João
Date:
2026-08-31 14:17:02 UTC
Severity:
normal
Tags:
#1146261#5
Date:
2026-08-30 21:02:34 UTC
From:
To:
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

#1146261#10
Date:
2026-08-30 23:33:56 UTC
From:
To:
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

#1146261#15
Date:
2026-08-31 12:32:27 UTC
From:
To:
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

#1146261#20
Date:
2026-08-31 12:45:50 UTC
From:
To:
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

#1146261#27
Date:
2026-08-31 13:18:06 UTC
From:
To:
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

#1146261#32
Date:
2026-08-31 13:48:51 UTC
From:
To:
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

#1146261#37
Date:
2026-08-31 14:14:13 UTC
From:
To:
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.