system-configuration-rs icon indicating copy to clipboard operation
system-configuration-rs copied to clipboard

Added `null` checks to dynamic store APIs

Open aw-cf opened this issue 1 year ago • 0 comments

We noticed crashes due to missing null checks in dynamic_store.rs.

Additional background: SCDynamicStoreCreate / SCDynamicStoreCreateWithOptions can return null. The returned value is currently passed to wrap_under_create_rule without a null check, which leads to an assertion error (Attempted to create a NULL object).

This PR adds additional checks and modifies affected APIs to return an Option instead.


This change is Reviewable

aw-cf avatar Aug 26 '24 13:08 aw-cf