Skip to content

UBSan abort in ext/gd/libgd/gd_interpolation.c:1007 #16559

Closed
@YuanchengJiang

Description

@YuanchengJiang

Description

The following code:

<?php
$input = imagecreatefrompng(__DIR__ . '/gh10614.png');
for ($angle = 0; $angle <= 270; $angle += 90) {
$output = imagerotate($input, $angle, 0);
}
$fusion = $output;
$thumbnail = imagescale($fusion, -1, 64, IMG_BICUBIC);

Resulted in this output:

/php-src/ext/gd/libgd/gd_interpolation.c:1007:28: runtime error: left shift of 134 by 24 places cannot be represented in type 'int'

PHP Version

nightly

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