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

(iOS) Fix for infinite loop reported in issue #591 #592

Closed
wants to merge 1 commit into from

Conversation

sherburne
Copy link

Platforms affected

iOS 13.x.

Motivation and Context

The do..while loop in tempFilePath has the potential to be infinite if the plugin is also configured with CameraUsesGeolocation set to TRUE and the user is capturing an image from the camera. I've reported this in issue #591.

Description

The infinite condition can be easily avoided by moving the initialization of filePath into the loop. The underlying problem is that timeIntervalSince1970 only has second granularity, however tempFilePath is called twice when capturing a picture when geolocation is enabled.

Testing

Tested on a base Cordova install running on iOS 13.x.

Checklist

  • I've run the tests to see all new and existing tests pass
  • I added automated test coverage as appropriate for this change
  • Commit is prefixed with (platform) if this change only applies to one platform (e.g. (android))
  • If this Pull Request resolves an issue, I linked to the issue in the text above (and used the correct keyword to close issues using keywords)
  • I've updated the documentation if necessary

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.

1 participant