Comment 39 for bug 1647485

Revision history for this message
Dan Streetman (ddstreet) wrote :

> 1) The mechanism employed of redirecting s and l (destination buffer and
> length remaining count) means that the code inside the redirection is
> incredibly fragile. The code inside the switch should be pulled out into
> a separate function. Then the redirection would become unnecessary.

https://github.com/systemd/systemd/pull/5168

> 2) IMHO, the patch should use the sizeof(x)/sizeof(x[0]) idiom to get
> the buffer lengths, rather than assuming that they are defined by the
> same macro.

that code was removed/refactored by pull request 5168

> 3) The upstream PR refers to tests, but does not add a test for this bug
> being fixed. Given the fragility of this fix, I think we should do that.

https://github.com/systemd/systemd/pull/5158

> If you add a test for this bug, please bundle it with the next SRU of
> this package in Xenial.

once all of my pull requests for this are merged I'll open a new lp bug to track SRUing them.