Closed julianwi closed 1 year ago
We should definitely protect against this, but just replacing this with an empty string seems like we're papering-over the problem here. Perhaps we should reject devices with no ID_PATH
? What device are you seeing this with?
Actually none of my disks and partitions has the ID_PATH property set. So simply rejecting them is not a good solution
OK, makes sense. The ID_PATH
(and dev->id_path
) aren't as widely-used as I'd thought.
@LuluTHSu you added the ID_PATH checks here; any thoughts on skipping the duplicate check if it's not populated?
@LuluTHSu ping? Let me know soon if you have any objections here.
@julianwi mind adding a signed-off-by for this?
added signoff
While trying to package petitboot for postmarketos, I experienced segafults in udev.c:191. Seems that udev can return null for the ID_PATH property in some cases. This should be handled properly instead of calling strcmp on a null pointer.