Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[registrar] Check parameter pointer before de-referencing it #7336

Merged
merged 1 commit into from
Oct 30, 2019

Conversation

spouliot
Copy link
Contributor

This case was generated (only) twice

  1. https://developer.apple.com/documentation/uikit/uipopoverpresentationcontrollerdelegate/1622326-popoverpresentationcontroller?language=objc
    where inView:(inout UIView * _Nonnull *)view;

  2. https://developer.apple.com/documentation/quicklook/qlpreviewcontrollerdelegate/1617007-previewcontroller?language=objc
    where inSourceView:(UIView * _Nullable *)view;
    and CGRect FrameForPreviewItem (QLPreviewController controller, [Protocolize] QLPreviewItem item, ref UIView view);

This is not an issue because it won't be null in those case
but making the code safer (against future changes/API) is safer.

The output (copy-back) to the pointer already has a null-check.

This case was generated (only) twice

1. https://developer.apple.com/documentation/uikit/uipopoverpresentationcontrollerdelegate/1622326-popoverpresentationcontroller?language=objc
where `inView:(inout UIView * _Nonnull *)view;`

2. https://developer.apple.com/documentation/quicklook/qlpreviewcontrollerdelegate/1617007-previewcontroller?language=objc
where `inSourceView:(UIView * _Nullable *)view;`
and `CGRect FrameForPreviewItem (QLPreviewController controller, [Protocolize] QLPreviewItem item, ref UIView view);`

This is not an issue because it won't be `null` in those case
but making the code safer (against future changes/API) is safer.

The output (copy-back) to the pointer already has a null-check.
@spouliot spouliot added the not-notes-worthy Ignore for release notes label Oct 30, 2019
@monojenkins
Copy link
Collaborator

Build success
Build succeeded
API Diff (from stable)
API Diff (from PR only) (no change)
Generator Diff (no change)
Test run succeeded

@spouliot spouliot merged commit f6efbf5 into xamarin:master Oct 30, 2019
@spouliot spouliot deleted the registrar-deref branch October 30, 2019 18:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
not-notes-worthy Ignore for release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants