[php-src] PR #11870: Fix off-by-one bug when truncating tempnam prefix
| From: | athos-ribeiro | Date: | Fri, 04 Aug 2023 02:22:17 +0000 |
| Subject: | [php-src] PR #11870: Fix off-by-one bug when truncating tempnam prefix | ||
| Groups: | php.git-pulls | ||
| Request: | Send a blank email to git-pulls+get-23269@lists.php.net to get a copy of this message | ||
Pull Request: https://github.com/php/php-src/pull/11870
Author: athos-ribeiro
The tempnam documentation currently states that "Only the first 63
characters of the prefix are used, the rest are ignored". However when
the prefix is 64 characters-long, the current implementation fails to
strip the last character, diverging from the documented behavior. This
patch fixes the implementation so it matches the documented behavior for
that specific case where the prefix is 64 characters long.