Skip to content
Commit 524805b3 authored by Rinat Ibragimov's avatar Rinat Ibragimov Committed by Albert Astals Cid
Browse files

handle non-ASCII encodings of file names in tar archives

Summary:
BUG: 266141

As UTF-8 may use multiple bytes per character, it's required to measure encoded file name length in bytes, not just in characters. It's possible to accidentally truncate file name if its name in characters is shorter that 100, but in bytes — longer than 100. Also, checksum calculation must be performed on unsigned bytes. Otherwise bytes in range 0x80-0xff when promoted to int become negative.

Reviewers: dfaure, kossebau

Reviewed By: dfaure

Subscribers: xyquadrat, broulik, cfeck, ibragimovrinat, kde-frameworks-devel

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D14674
parent f013beaa
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment