NSObjectSafe icon indicating copy to clipboard operation
NSObjectSafe copied to clipboard

部分可变类型的类别容易导致数据被截断

Open andy6shen opened this issue 6 years ago • 2 comments

例如NSMutableData类别中[hookReplaceBytesInRange:withBytes:],如果有需要替换长度超过原数据长度的情况下,超过长度的数据就被截断,这样的做法容易产生意想不到的后果,希望能再被优化,不是简单地截断后面的数据,其实不截断处理也不会崩溃,不是吗?请尽快想办法优化,已经有开发者遇到此问题了 @jasenhuang @hypoyao @tedzhou

andy6shen avatar Jul 11 '18 07:07 andy6shen

@andy6shen yeah,you're right. fix already

jasenhuang avatar Jul 11 '18 08:07 jasenhuang

OK,Thank you.

andy6shen avatar Jul 11 '18 08:07 andy6shen