php.net |  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
Votes:2
Avg. Score:2.0 ± 1.0
Reproduced:1 of 2 (50.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: cmb@php.net Assigned: cmb (profile)
Status: Assigned Package: GD related
PHP Version: 7.0.15RC1 OS: *
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2017-01-18 19:11 UTC] cmb@php.net
Description:
------------
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] <https://github.com/php/php-src/blob/PHP-7.0.15/ext/gd/gd.c#L4691-L4725>


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2017-01-18 19:12 UTC] cmb@php.net
-Assigned To: +Assigned To: cmb
 
PHP Copyright © 2001-2017 The PHP Group
All rights reserved.
Last updated: Sun Nov 19 01:31:42 2017 UTC