Commit Graph

39 Commits

Author SHA1 Message Date
Goooler
94ed86db28 Code cleanups 2021-08-27 01:16:46 +08:00
Goooler
e25c3636ff Update docs & licenses to use https 2021-08-26 07:40:32 -04:00
Comnir
f10060fe8f fix: when decoding with UTF-8 fails, create a new buffer for the retry with CESU-8.
If the decoding fails and there are UTF-8 decodable bytes before the bytes that couldn't be decoded, then the read index of the original buffer is incremented and those bytes will be missing from the decode result.
Now we create a new buffer and the decoding will start at the original start offset.

issue #2546
2021-04-03 13:28:22 +03:00
Connor Tumbleson
0a7b843786
fix: cleanup StringBlock from unused methods 2021-03-28 17:26:35 -04:00
Connor Tumbleson
447ba50332
refactor: drop author tags and support javadocs 2021-03-07 15:06:45 -05:00
wangyilei
e0e6cfd03f only log string decode warning when failed 2021-03-06 22:00:54 +08:00
Comnir
f1321c8437 fix issue 2299: Unicode code points higher than 0x10000 decoding fails.
- Use CESU8 decoder instead of UTF-8 in StringBlock.
- DEX uses Modified UTF-8 which is close to CESU-8 (https://source.android.com/devices/tech/dalvik/dex-format#mutf-8)
2020-12-10 12:38:55 +02:00
Comnir
201b5976bb Add tests for StringBlock#decodeString with failing tests for code points above 0x10FFFF (issue 2299). 2020-12-10 12:29:34 +02:00
Connor Tumbleson
150ffc4fdc style: remove weird indented code 2020-11-28 16:58:31 -05:00
Connor Tumbleson
f1393c3ca6 refactor: return null, if always null 2020-11-28 16:58:31 -05:00
Connor Tumbleson
2eac0339b4 refactor: use easier to read string decode 2020-11-28 16:58:31 -05:00
Connor Tumbleson
db70927699 style: remove unused imports 2020-11-28 16:58:31 -05:00
Connor Tumbleson
45ae71204e chore: remove StringBlock unused m_stringOwns 2020-11-28 16:58:31 -05:00
Connor Tumbleson
3f831c8221
refactor: copyright year should be year started, not current year 2020-04-11 06:33:05 -04:00
Frieder Bluemle
81ca785e02
Fix file header comment format 2020-02-29 17:37:46 -08:00
Connor Tumbleson
25a1cb02ef
fix: License 2019 update 2019-07-13 12:19:41 -04:00
Connor Tumbleson
3f85dfa6c9 fix: revert change that enforced "STRINGPOOL_TYPE" on StringPool
- fixes: #1876
2018-08-23 17:14:38 -04:00
Connor Tumbleson
b7b449eaaf
We are ignoring typeIdOffset
- missing sample that experiences this
 - needs tests
 - samples requested: https://github.com/iBotPeaches/Apktool/issues/1728
 - refs: f90f2f8dc3
2018-02-16 08:38:07 -05:00
Connor Tumbleson
9fc1ede991
License 2018 update 2018-02-16 08:26:53 -05:00
Connor Tumbleson
3264f142cb
Remove useless null warning 2017-11-29 07:56:24 -05:00
Connor Tumbleson
1597c12472 changed all license files 2017-07-05 12:05:52 -04:00
Connor Tumbleson
d979247794
patches for style decoding 2017-05-23 09:27:27 -04:00
Connor Tumbleson
390ecae6c5
Handle strings with style index at end of string 2017-05-19 09:28:44 -04:00
Connor Tumbleson
b09dce4050
Prevent loading styles if style position is outside of string
- fixes #1453
2017-05-08 09:03:13 -04:00
Alexei Khlebnikov
0fa6418553 fix of binary xml string length encoding, now supporting long resource strings 2017-04-04 17:19:21 +02:00
Connor Tumbleson
af2f54245b [skip] remove confusing logic 2015-12-03 07:57:12 -06:00
Connor Tumbleson
9b1c7d22ef JEB - Fix decompressor when string arrays aren't 4-byte aligned 2014-11-01 21:21:35 -05:00
Connor Tumbleson
9031c22365 [skip] update all copyrights to 2014 2014-10-23 18:14:48 -05:00
Connor Tumbleson
06bcff5b6f [skip] update changelog, code style fixes 2014-10-05 12:35:03 -05:00
Connor Tumbleson
62db52fe7b Handle APKs with NULL padding on StringPools
- issue 664
2014-10-05 12:34:38 -05:00
Connor Tumbleson
d90bea10ce malformed styles
if styles are malformed html, then recreation fails with OutOfBounds,
end tag if error occurs to prevent crash
2014-02-09 20:45:16 -06:00
Connor Tumbleson
94b90a6dd2 add code style doc rules, adjusting stringblock to 120 margin 2014-02-09 19:23:25 -06:00
Connor Tumbleson
086139a037 code cleanup of 2014 2014-02-09 19:01:57 -06:00
Connor Tumbleson
ca314b9aae fix abused lengths (strings over 32768) for UTF-16 strings 2014-02-09 18:48:40 -06:00
Connor Tumbleson
e48ab8b9b9 threadsafe StringBlock 2014-02-07 07:35:03 -06:00
Connor Tumbleson
1d745ac0ad correctly handles abused length strings - jtmuhone 2013-12-18 08:41:18 -06:00
Connor Tumbleson
a48c11dc1c cleanup of various functions
Removed attr sorting that was never enabled and never worked, added @todo elements for unknown file handling, updated usage output
2013-04-01 16:41:27 -05:00
Connor Tumbleson
e82c0754de Code cleanup of 2013
Signed-off-by: Connor Tumbleson <connor.tumbleson@gmail.com>
2013-02-12 21:12:17 -06:00
Connor Tumbleson
4db49ab347 Adding brut.apktool :/ 2012-09-19 20:27:35 -05:00