| Summary: |
[PATCH] Check arguments to udev_enumerate_new |
| Product: |
systemd
|
Reporter: |
Michael Terry <michael.terry> |
| Component: |
general | Assignee: |
systemd-bugs |
| Status: |
RESOLVED
FIXED
|
QA Contact: |
systemd-bugs |
| Severity: |
normal
|
|
|
| Priority: |
medium
|
|
|
| Version: |
unspecified | |
|
| Hardware: |
Other | |
|
| OS: |
All | |
|
| Whiteboard: |
|
|
i915 platform:
|
|
i915 features:
|
|
| Attachments: |
Proposed patch
|
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.
udev_enumerate_new() does not check its input argument of a 'struct udev' for NULLness. This means that arguably sloppy code like in Xorg: udev = udev_monitor_get_udev(udev_monitor); enumerate = udev_enumerate_new(udev); if (!enumerate) return; Will have a valid (but unusable) enumerate object even if the 'udev' pointer itself is NULL. While the Xorg code should probably also check the 'udev' pointer, I think it makes sense for libudev to not create/return a bogus enumerate object. Plus, the other functions in libudev are pretty good about validating their input, so it would be consistent. Patch coming.