https://bugs.documentfoundation.org/show_bug.cgi?id=163393

--- Comment #3 from BogdanB <[email protected]> ---
I found this in
https://opengrok.libreoffice.org/xref/core/vcl/source/filter/png/PngImageReader.cxx?r=92067587#44

void lclReadStream(png_structp pPng, png_bytep pOutBytes, png_size_t
nBytesToRead)
31  {
32      png_voidp pIO = png_get_io_ptr(pPng);
33  
34      if (pIO == nullptr)
35          return;
36  
37      SvStream* pStream = static_cast<SvStream*>(pIO);
38  
39      sal_Size nBytesRead = pStream->ReadBytes(pOutBytes, nBytesToRead);
40  
41      if (nBytesRead != nBytesToRead)
42      {
43          if (!nBytesRead)
44              png_error(pPng, "Error reading");
45          else
46          {
47              // Make sure to not reuse old data (could cause infinite loop).
48              memset(pOutBytes + nBytesRead, 0, nBytesToRead - nBytesRead);
49              png_warning(pPng, "Short read");
50          }
51      }
52  }

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to