Browse Source
* fix: correct null check variable in TryResolveFileReferenceUri on macOS The null check on line 401 tested `fileUri` instead of `filePathUri`, making it dead code since `fileUri` was already checked on line 394. When `[fileUri filePathURL]` returned nil (non-file URL or unreachable resource), the nil `filePathUri` was passed to `[filePathUri absoluteString]` and then to `CreateAvnString`, causing a native crash. * fix: initialize NSError to nil in SaveBookmarkToBytes on macOS NSError* was declared without initialization, containing stack garbage. On the success path (bookmarkData non-nil), Cocoa does not guarantee zeroing the error out-parameter, so the subsequent `if (error != nil)` check could read garbage and incorrectly call CreateAvnString with a garbage pointer. Initialize to nil and restructure to `else if` so the error is only inspected when bookmarkData is nil (the failure path). * chore: retrigger CI * fix: guard out-parameters in SaveBookmarkToBytes Initialize *ppv to nullptr on entry so callers never read garbage on the nil-fileUri / nil-bookmarkData paths. Guard *err write with a nullptr check for callers that pass no error out-parameter. * chore: retrigger CI --------- Co-authored-by: Julien Lebosquain <julien@lebosquain.net>release/12.0.1
committed by
Julien Lebosquain
1 changed files with 5 additions and 3 deletions
Loading…
Reference in new issue