This PR adds missing range checks in the native `_getItemAsRawImage` and 
`ByteArrayFromPixels` methods in `GlassPasteboard.m` (for both mac and ios).

Note that these checks are _very_ unlikely to ever detect an error in practice, 
since they would require a huge image to be copied to the macOS system 
clipboard (larger than can be created using a Java program). If this were to be 
detected, no exception would (or should be) thrown, given that the method that 
triggers this is the reading of the clipboard (so there is nothing that the 
application is doing wrong for which an exception would make sense).

-------------

Commit messages:
 - 8315958: Missing range checks in GlassPasteboard

Changes: https://git.openjdk.org/jfx/pull/1238/files
 Webrev: https://webrevs.openjdk.org/?repo=jfx&pr=1238&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8315958
  Stats: 19 lines in 2 files changed: 14 ins; 0 del; 5 mod
  Patch: https://git.openjdk.org/jfx/pull/1238.diff
  Fetch: git fetch https://git.openjdk.org/jfx.git pull/1238/head:pull/1238

PR: https://git.openjdk.org/jfx/pull/1238

Reply via email to