|   | php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
| 
 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits              [2017-01-21 00:03 UTC] cmb@php.net
 
-Assigned To:
+Assigned To: cmb
  [2017-01-21 12:09 UTC] cmb@php.net
  [2017-01-21 12:28 UTC] cmb@php.net
  [2017-01-21 12:28 UTC] cmb@php.net
 
-Status: Assigned
+Status: Closed
 | |||||||||||||||||||||||||||
|  Copyright © 2001-2025 The PHP Group All rights reserved. | Last updated: Fri Oct 31 03:00:01 2025 UTC | 
Description: ------------ libgd's XBM reader calculates the maximum number of image data bytes to read in advance. However, it doesn't take into account the line padding, so reading of XBM files with a width that is not a multiple of 8 is likely to fail, for instance with the following test.xbm: #define test_width 10 #define test_height 10 static unsigned char test_bits[] = { 0xFF, 0x03, 0x00, 0x00, 0xFF, 0x03, 0x00, 0x00, 0xFF, 0x03, 0x00, 0x00, 0xFF, 0x03, 0x00, 0x00, 0xFF, 0x03, 0x00, 0x00}; Test script: --------------- <?php $im = imagecreatefromxbm(__DIR__ . '/test.xbm'); var_dump($im); Expected result: ---------------- resource(%d) of type (gd) Actual result: -------------- Warning: imagecreatefromxbm(): EOF before image was complete in %s on line %d Warning: imagecreatefromxbm(): '%s' is not a valid XBM file in %s on line %d bool(false)