Via HackerOne, although this is not a security issue. PhutilRope does have a bug with byte handling, though.
Details
Details
- Reviewers
chad - Commits
- rPHUe0dd9c4efda1: Fix an issue with removing bytes in PhutilRope
Added a failing test and made it pass.
Diff Detail
Diff Detail
- Repository
- rPHU libphutil
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
src/utils/PhutilRope.php | ||
---|---|---|
102 | The bug was here: we incorrectly used $length instead of $remaining_length, so we could strip too many bytes off the buffer. I've tried to rename variables to make the method more clear, since $len, $length and $remaining_length were fairly confusing. | |
src/utils/__tests__/PhutilRopeTestCase.php | ||
33 | Prior to this fix, this incorrectly output "ddddddddd". |