Fix for invalid zip files where buf is nil