|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #73957 signed integer conversion in imagescale()
Submitted: 2017-01-18 19:11 UTC Modified: 2017-01-18 19:12 UTC
Avg. Score:2.0 ± 1.0
Reproduced:1 of 2 (50.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: Assigned: cmb (profile)
Status: Closed Package: GD related
PHP Version: 7.0.15RC1 OS: *
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
40 + 12 = ?
Subscribe to this entry?

 [2017-01-18 19:11 UTC]
The int parameters given to imagescale() are converted from
zend_long to int without checking their range[1]. This allows for
silent truncation, and even worse, the result of signed integer
conversion is unspecified if the value cannot be represented by
the target type.

[1] <>


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2017-01-18 19:12 UTC]
-Assigned To: +Assigned To: cmb
 [2018-03-09 23:38 UTC]
Automatic comment on behalf of
Log: Fix #73957: signed integer conversion in imagescale()
 [2018-03-09 23:38 UTC]
-Status: Assigned +Status: Closed
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Wed Oct 04 12:01:25 2023 UTC