[Mono-bugs] [Bug 78213][Maj] New - Bitmap ctor loops infinitely on a truncated PNG

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Wed Apr 26 12:00:52 EDT 2006

Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by pawel.sakowski at mind-breeze.com.


--- shadow/78213	2006-04-26 12:00:52.000000000 -0400
+++ shadow/78213.tmp.14715	2006-04-26 12:00:52.000000000 -0400
@@ -0,0 +1,38 @@
+Bug#: 78213
+Product: Mono: Class Libraries
+Version: 1.1
+OS: GNU/Linux [Other]
+OS Details: 
+Status: NEW   
+Priority: Major
+Component: libgdiplus
+AssignedTo: peter at novonyx.com                            
+ReportedBy: pawel.sakowski at mind-breeze.com               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+Summary: Bitmap ctor loops infinitely on a truncated PNG
+Description of Problem:
+If an incorrectly short PNG file is opened, _gdip_png_stream_read_data
+hangs in a busy loop trying to read the remaining bytes (with the invariant
+res==0, bytesRead<length).
+Steps to reproduce the problem:
+new Bitmap(File.OpenRead("foo.png"))
+Actual Results:
+never returns, inflicting 100% CPU load
+Expected Results:
+fails with an appropriate exception
+How often does this happen? 
+Additional Information:
+Not attaching the problematic image, since any PNG file missing its last
+several bytes should suffice to reproduce the problem.

More information about the mono-bugs mailing list