Created attachment 68501 [details] Check that the passed pointers are not the same sd_journal_get_cutoff_realtime_usec(sd_journal* j, uint64_t* from, uint64_t* to) checks that the parameters 'to' and 'from' are not both null at the same time. That makes sense as it would not produce any result. Another way to get a bad result is if the same pointer is passed as both 'to' and 'from'. This is not a problem for any real code that I know of. I was just reading the docs and wondering what would happen. The attached patch adds a check for this in sd_journal_get_cutoff_realtime_usec and sd_journal_get_cutoff_monotonic_usec.
Normally we don't check such stuff, since there's just too many ways to get things wrong, but in this case, a) the check is very cheap compared to the rest of the function, b) it seems like an error that is relatively easy to make in a long list of arguments. I think you should go ahead and apply it.
Applied in http://cgit.freedesktop.org/systemd/systemd/commit/?id=3988773.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.