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

+[OCMArg setTo:] crashes if invoked with NULL #281

Merged
merged 1 commit into from
Jan 20, 2016
Merged

+[OCMArg setTo:] crashes if invoked with NULL #281

merged 1 commit into from
Jan 20, 2016

Conversation

ian-twilightcoder
Copy link
Contributor

OCMock 3.2.1 introduced a bug where something like this crashes.
OCMStub([mockFileManager createSymbolicLinkAtURL:OCMOCK_ANY withDestinationURL:OCMOCK_ANY error:[OCMArg setTo:nil]]).andReturn(YES);
[mockFileManager createSymbolicLinkAtURL:symlinkFile withDestinationURL:symlinkDestination error:NULL];

Fix it by checking for NULL in OCMPassByRefSetter.

OCMock 3.2.1 introduced a bug where something like this crashes.
OCMStub([mockFileManager createSymbolicLinkAtURL:OCMOCK_ANY withDestinationURL:OCMOCK_ANY error:[OCMArg setTo:nil]]).andReturn(YES);
[mockFileManager createSymbolicLinkAtURL:symlinkFile withDestinationURL:symlinkDestination error:NULL];

Fix it by checking for NULL in OCMPassByRefSetter.
erikdoe added a commit that referenced this pull request Jan 20, 2016
+[OCMArg setTo:] crashes if invoked with NULL
@erikdoe erikdoe merged commit 6689ba4 into erikdoe:master Jan 20, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants