[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#726970: freebsd-glue: Broken funopen() implementation



Source: freebsd-glue
Source-Version: 0.1.11
Severity: important

Hi,

The funopen() implementation in this package uses nested functions to
wrap the argument hooks, but it returns a FILE structure pointing to
those nested functions and their references to arguments from the
stack, to be accessed outside of the function lexical scope, which is
just wrong. I've not tested if this currently breaks, but this is
explicitly stated as broken usage.

In 2011 I started some draft code to add funopen() support to libbsd,
but left it aside given the various issues with the interface. I've
just finished and polished a full implementation, and pushed to libbsd's
git master, it will be included in 0.7.0.

Regards,
Guillem


Reply to: