float_cast_overflow.phpt 751 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. --TEST--
  2. Overflow in float to int cast
  3. --EXTENSIONS--
  4. exif
  5. --FILE--
  6. <?php
  7. var_dump(@exif_read_data(__DIR__ . '/float_cast_overflow.tiff'));
  8. ?>
  9. --EXPECTF--
  10. array(8) {
  11. ["FileName"]=>
  12. string(24) "float_cast_overflow.tiff"
  13. ["FileDateTime"]=>
  14. int(%d)
  15. ["FileSize"]=>
  16. int(142)
  17. ["FileType"]=>
  18. int(7)
  19. ["MimeType"]=>
  20. string(10) "image/tiff"
  21. ["SectionsFound"]=>
  22. string(24) "ANY_TAG, IFD0, THUMBNAIL"
  23. ["COMPUTED"]=>
  24. array(5) {
  25. ["html"]=>
  26. string(20) "width="1" height="1""
  27. ["Height"]=>
  28. int(1)
  29. ["Width"]=>
  30. int(1)
  31. ["IsColor"]=>
  32. int(0)
  33. ["ByteOrderMotorola"]=>
  34. int(0)
  35. }
  36. ["THUMBNAIL"]=>
  37. array(2) {
  38. ["ImageWidth"]=>
  39. int(1)
  40. ["ImageLength"]=>
  41. float(-2.5961487387524236E+33)
  42. }
  43. }