[php-src] PR #25952: Fix GH-25948: BMP height INT32_MIN invokes undefined behavior in abs()

From: Date: Mon, 30 Nov 2026 16:22:38 +0000
Subject: [php-src] PR #25952: Fix GH-25948: BMP height INT32_MIN invokes undefined behavior in abs()
Groups: php.git-pulls 
Request: Send a blank email to git-pulls+get-41260@lists.php.net to get a copy of this message
Pull Request: https://github.com/php/php-src/pull/25952 Author: lazerg BMP stores a signed height, and php_handle_bmp() takes abs() of it to handle top-down images. A height of INT32_MIN has no positive counterpart, so abs() overflows (UBSan flags it) and getimagesize() reports a garbage size. Such a header is invalid, so it is now rejected and getimagesize() returns false. Fixes #25948

« previous php.git-pulls (#41260) next »