angler-fishThe Vulnerability History Project

Avoid OOB memcpy in chrome_pdf::CopyImage.

      This is a re-work of palmer's patch at https://codereview.chromium.org/515023002/ which has more context, but comes down to stricter bounds checking.

We also correct an arithmetic bug when copying the image behind a control that is positioned before the origin of the image.

BUG=398384

Review URL: https://codereview.chromium.org/519873002

Cr-Commit-Position: refs/heads/master@{#293213}
    
commit d734d197bb5462a65c37b17594a8c8d07dd79bc1
+1 -1
+3 -12
expand_less