pixelglow/zipzap — pull request #63 by goetzf (2014-05-22 11:35:19+00:00)
Title: Fix memory corruption when reading uncompressed archives on pre-10.9 systems.

When reading a file from an archive which is stored unencrypted and without compression, data are simply copied in the `-newData*` methods. However, on pre-OS X 10.9 systems, `[NSData copy]` simply returns the same object (this bug is also documented in [rdar://14670403](http://openradar.appspot.com/14670403)). On OS X 10.9, `-copy` returns a new object. This issue led to a memory corruption when reading the unarchived data from zip files later on.
The pull request fixes this problem by using `[[NSData alloc] initWithBytes:length:]`, which always copies the passed data.