Fix json string crash

This commit is contained in:
Leith Bade
2014-11-18 23:34:46 +11:00
parent 900f6e87fa
commit e52cf05ac3
3 changed files with 10 additions and 7 deletions

View File

@@ -448,7 +448,7 @@ static CURLcode sslctx_function(CURL */*curl*/, void *sslctx, void */*parm*/) {
const std::unique_ptr<char[]> pem = boost::make_unique<char[]>(stat.size);
if (zip_fread(apk_file, reinterpret_cast<void *>(pem.get()), stat.size) == -1) {
if (static_cast<zip_uint64_t>(zip_fread(apk_file, reinterpret_cast<void *>(pem.get()), stat.size)) != stat.size) {
zip_fclose(apk_file);
apk_file = nullptr;
zip_close(apk);