-
Notifications
You must be signed in to change notification settings - Fork 9.7k
[camera_windows] Check string size before Win32 MultiByte <-> WideChar conversions #6170
Conversation
|
It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact Hixie on the #hackers channel in Chat (don't just cc him here, he won't see it! He's on Discord!). If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix? Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. |
cbracken
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you encounter a bug that led to this patch? If so, please list it in the PR description and add a test that replicates the failure.
|
@cbracken not really a particular issue - same story as flutter/flutter#94608 (found through code audit vs. Win32 API docs). |
|
Thanks. Normally we'd ask for a test, but I'm not sure we necessarily want to add a test that involves passing a string longer than
It will need a test exemption though. |
|
test-exempt: not practically testable |
cbracken
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
@cbracken Great, camera_windows will be safe against 1+ million American Libraries of Congress string attacks :-). I see the submit-queue/CI failures in other plugin PRs so I'll sync from main to see if it unclogs things. |
|
Thanks! |
…-> WideChar conversions (flutter/plugins#6170)
…r conversions (flutter#6170) This PR adds a check for string max length in Utf8FromUtf16 and Utf16FromUtf8, similar to flutter/flutter#99729 / flutter/flutter#94608.
…r conversions (flutter#6170) This PR adds a check for string max length in Utf8FromUtf16 and Utf16FromUtf8, similar to flutter/flutter#99729 / flutter/flutter#94608.
…r conversions (flutter#6170) This PR adds a check for string max length in Utf8FromUtf16 and Utf16FromUtf8, similar to flutter/flutter#99729 / flutter/flutter#94608.

This PR adds a check for string max length in Utf8FromUtf16 and Utf16FromUtf8, similar to flutter/flutter#99729 / flutter/flutter#94608.
Pre-launch Checklist
dart format.)[shared_preferences]pubspec.yamlwith an appropriate new version according to the [pub versioning philosophy], or this PR is [exempt from version changes].CHANGELOG.mdto add a description of the change, [following repository CHANGELOG style].///).