diff options
author | Caolán McNamara <caolanm@redhat.com> | 2022-05-23 17:24:06 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2022-05-24 09:54:21 +0200 |
commit | c16652e1ecf0a8cfcd50f361c199ff7598282b9c (patch) | |
tree | 9c4ca5e646c11f5c273eaf11fc9056e13745fa05 | |
parent | a279887f1299838630b941d9c2aec3bff4922bf2 (diff) |
move the comment around a bit
Change-Id: I784534285baa5e68f8d8877c6a5fe8c10e5eb429
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134843
Tested-by: Caolán McNamara <caolanm@redhat.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r-- | vcl/source/filter/itiff/itiff.cxx | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/vcl/source/filter/itiff/itiff.cxx b/vcl/source/filter/itiff/itiff.cxx index 9f51e28df0a9..4514ce916959 100644 --- a/vcl/source/filter/itiff/itiff.cxx +++ b/vcl/source/filter/itiff/itiff.cxx @@ -267,14 +267,14 @@ bool ImportTiffGraphicImport(SvStream& rTIFF, Graphic& rGraphic) img.put.separate = putSeparatePixel; } - bOk = TIFFRGBAImageGet( - &img, reinterpret_cast<uint32_t *>(sizeof (uint32_t)), w, img.height); - // we don't access TIFFRGBAImageGet's raster argument in our custom putContigPixel/ - // putSeparatePixel functions, but TIFFRGBAImageGet nevertheless internally - // advances that pointer, so passing nullptr would cause UBSan nullptr-with-offset - // errors; while technically still UB, this HACK of passing a non-null pointer keeps - // UBSan happy for now (and better use an artificial pointer value which would - // hopefully cause SIGSEGV if it should erroneously be dereferenced after all) + // we don't access TIFFRGBAImageGet's raster argument in our custom putContigPixel/ + // putSeparatePixel functions, but TIFFRGBAImageGet nevertheless internally + // advances that pointer, so passing nullptr would cause UBSan nullptr-with-offset + // errors; while technically still UB, this HACK of passing a non-null pointer keeps + // UBSan happy for now (and better use an artificial pointer value which would + // hopefully cause SIGSEGV if it should erroneously be dereferenced after all) + uint32_t* unused_raster = reinterpret_cast<uint32_t *>(sizeof (uint32_t)); + bOk = TIFFRGBAImageGet(&img, unused_raster, w, img.height); TIFFRGBAImageEnd(&img); } else |