vcl/source/filter/GraphicFormatDetector.cxx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
New commits: commit 93f7966140d71ac8a2489fa4cd5d88ba4d54620d Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Tue Feb 16 20:27:40 2021 +0000 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Wed Feb 17 12:18:29 2021 +0100 ofz#31021 Stack-buffer-overflow Conditional jump or move depends on uninitialised value(s) at 0x483CB98: strlen (vg_replace_strmem.c:459) by 0x49B4CA3: int rtl::str::getLength<char>(char const*) (strtmpl.hxx:65) by 0x49B7232: void rtl::str::newFromStr<_rtl_String>(_rtl_String**, rtl::str::STRCODE_DATA<_rtl_String>::type const*) (strtmpl.hxx:1344) by 0x49B470C: rtl_string_newFromStr (string.cxx:611) by 0x6059266: rtl::OString::OString<char [18]>(char (&) [18], rtl::libreoffice_internal::NonConstCharArrayDetector<char [18], rtl::libreoffice_internal::Dummy>::Type) (string.hxx:275) by 0x6058B5E: vcl::GraphicFormatDetector::checkTGA() (GraphicFormatDetector.cxx:525) since... commit 48d655fe12bc2c4c42d6c88b8a43fade1614ee2a Date: Mon Feb 15 16:25:56 2021 +0900 vcl: Detect TGA graphic by inspecting the file footer Change-Id: I52641ac541d5631e16fc271c35d6a671acb75c93 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111006 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> diff --git a/vcl/source/filter/GraphicFormatDetector.cxx b/vcl/source/filter/GraphicFormatDetector.cxx index e5a1eb5f9a79..4a2117b6f5b9 100644 --- a/vcl/source/filter/GraphicFormatDetector.cxx +++ b/vcl/source/filter/GraphicFormatDetector.cxx @@ -522,8 +522,7 @@ bool GraphicFormatDetector::checkTGA() mrStream.SeekRel(-18); mrStream.ReadBytes(sFooterBytes, 18); - OString aFooterString(sFooterBytes); - if (aFooterString == "TRUEVISION-XFILE.") + if (memcmp(sFooterBytes, "TRUEVISION-XFILE.", SAL_N_ELEMENTS(sFooterBytes)) == 0) { msDetectedFormat = "TGA"; return true; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits