[systemd-devel] sd-device: fix invalid property strv pointers

Tom Gundersen teg at jklm.no
Mon Jun 1 02:52:43 PDT 2015


On Mon, Jun 1, 2015 at 11:39 AM, Martin Pitt <martin.pitt at ubuntu.com> wrote:
> With our 220 package I still get a broken environment in udev
> callouts, even with Tom's recent fix 0e3e605 applied.
>
> Curiously it works for devices like "lo" which don't have a lot of
> properties, but for "real" wlan devices I get invalid environment
> variables. With some debugging applied (http://paste.ubuntu.com/11492452/)
> this is visible in the bogus strings that udev_device_get_properties_envp()
> returns: http://paste.ubuntu.com/11492458/
>
> I tracked that down to invalid memory handling in
> device_update_properties_bufs(). Patch attached with detailled
> explanation.

Thanks for figuring this out Martin. The patch looks good to me,
though maybe we should use NULSTR_FOREACH for the second loop?

Go ahead and push.

Cheers,

Tom


More information about the systemd-devel mailing list