PureBasic Forum
https://www.purebasic.fr/english/

IMA on certain corrupted PNG image files.
https://www.purebasic.fr/english/viewtopic.php?f=4&t=73214
Page 1 of 1

Author:  djes [ Thu Jul 18, 2019 1:40 pm ]
Post subject:  IMA on certain corrupted PNG image files.

Somewhat similar to this viewtopic.php?f=4&t=72364

The following code is crashing the debugger with the given malformed image file. Nothing seems to happen without the debugger, but a crash finish to occur after some times.
Code:
EnableDebugger
UsePNGImageDecoder()

If OpenWindow(0, 0, 0, 256, 256, "PNG bug test", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
 
  LoadImage(0, "0.png") ; Good picture file
  Debug "OK"
  LoadImage(0, "11244.png") ; Bad picture file
  Debug "Not OK"
  ImageGadget(0, 0, 0, 256, 256, ImageID(0))
 
  Repeat : Until WaitWindowEvent() = #PB_Event_CloseWindow
EndIf

Full archive with images

Page 1 of 1 All times are UTC + 1 hour
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/