[php-src] PR #13852: Remove broken check in var_unserializer
| From: | nielsdos | Date: | Sun, 31 Mar 2024 12:22:55 +0000 |
| Subject: | [php-src] PR #13852: Remove broken check in var_unserializer | ||
| Groups: | php.git-pulls | ||
| Request: | Send a blank email to git-pulls+get-25591@lists.php.net to get a copy of this message | ||
Pull Request: https://github.com/php/php-src/pull/13852
Author: nielsdos
end = *p+maxlen, and pointer overflow is UB, so that means that a check of the form
end < *p will always be false because it can only be true on pointer overflow. In
particular, the compiler simplifies this to maxlen < 0 which is always false because
maxlen is unsigned.