[php-src] Issue #14807: Signed integer overflow in ext/standard/levenshtein.c

From: Date: Thu, 04 Jul 2024 03:20:50 +0000
Subject: [php-src] Issue #14807: Signed integer overflow in ext/standard/levenshtein.c
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-247222@lists.php.net to get a copy of this message
Issue: https://github.com/php/php-src/issues/14807 Author: YuanchengJiang ### Description The following code: ```php <?php $a = PHP_INT_MIN; levenshtein($a,$a,$a,$a,$a); ``` Resulted in this output: ``` /php-src/ext/standard/levenshtein.c:54:20: runtime error: signed integer overflow: -9223372036854775808 + -9223372036854775808 cannot be represented in type 'long' SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /php-src/ext/standard/levenshtein.c:54:20 ``` ### PHP Version PHP 8.4.0-dev ### Operating System ubuntu 22.04

« previous php.bugs (#247222) next »