[TYPO3-core] RFC #12230: Bug: Function tslib_cObj::crop() is not fully multibyte safe

Christian Kuhn lolli at schwarzbu.ch
Thu Feb 10 21:08:57 CET 2011


On 01/31/2011 12:18 PM, Vladimir Podkovanov wrote:
> Problem:
> tslib_cObj::crop() use not multibyte safe strlen() to determine if
> string should be cropped it results in needless afterstring (...) even
> if string wasn't truncated.
>
> Solution:
> Use multibyte safe strlen()

+1 on reading and testing.

Committed with a minor variable renaming to:
* trunk rev. 10431
* 4.5 rev. 10432
* 4.4 rev. 10433

Committed a simple unit test (red befor, green after) from your TS 
(thanks!) to:
* trunk rev. 10434
* 4.5 rev. 10435

Regards
Christian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 12230_v4.diff
Type: text/x-patch
Size: 1538 bytes
Desc: not available
URL: <http://lists.typo3.org/pipermail/typo3-team-core/attachments/20110210/869737ea/attachment-0003.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 12230_v4-4.4.diff
Type: text/x-patch
Size: 1802 bytes
Desc: not available
URL: <http://lists.typo3.org/pipermail/typo3-team-core/attachments/20110210/869737ea/attachment-0004.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 12230_v4-test.diff
Type: text/x-patch
Size: 630 bytes
Desc: not available
URL: <http://lists.typo3.org/pipermail/typo3-team-core/attachments/20110210/869737ea/attachment-0005.bin>


More information about the TYPO3-team-core mailing list