Skip to content

Conversation

@wiredfool
Copy link
Member

  src/_imaging.c:1842:17: warning: ‘ImagingTransform’ accessing 64 bytes in a region of size 48 [-Wstringop-overflow=]
   1842 |         imOut = ImagingTransform(
        |                 ^~~~~~~~~~~~~~~~~
   1843 |             imOut, imIn, IMAGING_TRANSFORM_AFFINE, 0, 0, xsize, ysize, a, filter, 1);
        |             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  src/_imaging.c:1842:17: note: referencing argument 8 of type ‘double *’

      src/_imaging.c:1842:17: warning: ‘ImagingTransform’ accessing 64 bytes in a region of size 48 [-Wstringop-overflow=]
       1842 |         imOut = ImagingTransform(
            |                 ^~~~~~~~~~~~~~~~~
       1843 |             imOut, imIn, IMAGING_TRANSFORM_AFFINE, 0, 0, xsize, ysize, a, filter, 1);
            |             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      src/_imaging.c:1842:17: note: referencing argument 8 of type ‘double *’
@Yay295
Copy link
Contributor

Yay295 commented Nov 3, 2022

Just fyi, this isn't actually an error per se. ImagingTransform takes an "a" that is double[8], but ImagingTransformAffine takes a double[6], so passing a double[6] here is okay. I'd written a comment about this in my local code but hadn't committed it yet.

@wiredfool
Copy link
Member Author

Yeah, I'd run through the analysis of if it was an issue or not and came to the conclusion that it was not a memory safety issue, so not a security problem. It's still a warning that should be silenced, at a cost of 2 extra doubles on the stack.

@radarhere radarhere merged commit 03b8ac9 into python-pillow:main Nov 6, 2022
@radarhere radarhere changed the title Fix compiler error: accessing 64 bytes in a region of size 48 Fix compiler warning: accessing 64 bytes in a region of size 48 Nov 6, 2022
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.

3 participants