Skip to content

Unexpected value in ext/gd/libgd/gd_interpolation.c:2443 #16322

Closed
@YuanchengJiang

Description

@YuanchengJiang

Description

The following code:

<?php
$matrix = [PHP_INT_MAX, 1, 1, 1, 1, 1];
$src = imagecreatetruecolor(8, 8);
var_dump(imageaffine($src, $matrix));

Resulted in this output:

/php-src/ext/gd/libgd/gd_interpolation.c:2443:17: runtime error: 7.3787e+19 is outside the range of representable values of type 'int'
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /php-src/ext/gd/libgd/gd_interpolation.c:2443:17 in

PHP Version

PHP 8.4.0-dev

Operating System

ubuntu 22.04

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions