diff options
| -rw-r--r-- | src/networkfilemanager.cpp | 10 | ||||
| -rwxr-xr-x | test/fuzzers/build.sh | 2 |
2 files changed, 2 insertions, 10 deletions
diff --git a/src/networkfilemanager.cpp b/src/networkfilemanager.cpp index 64969d0f..c4cb41d9 100644 --- a/src/networkfilemanager.cpp +++ b/src/networkfilemanager.cpp @@ -1953,13 +1953,6 @@ static std::string build_url(PJ_CONTEXT *ctx, const char *name) { remote_file += '/'; } remote_file += name; - auto pos = remote_file.rfind('.'); - if (pos + 4 == remote_file.size()) { - remote_file = remote_file.substr(0, pos) + ".tif"; - } else { - // For example for resource files like 'alaska' - remote_file += ".tif"; - } } return remote_file; } @@ -2384,8 +2377,7 @@ int proj_download_file(PJ_CONTEXT *ctx, const char *url_or_filename, return false; } - if (size_read < - std::min(static_cast<unsigned long long>(buffer.size()), props.size)) { + if (size_read == 0) { pj_log(ctx, PJ_LOG_ERROR, "Did not get as many bytes as expected"); ctx->networking.close(ctx, handle, ctx->networking.user_data); f.reset(); diff --git a/test/fuzzers/build.sh b/test/fuzzers/build.sh index 5e60c16d..1b2bf79c 100755 --- a/test/fuzzers/build.sh +++ b/test/fuzzers/build.sh @@ -55,7 +55,7 @@ SQLITE3_CFLAGS=-I/usr/include SQLITE3_LIBS=-lsqlite3 TIFF_CFLAGS=-I$SRC/install/ make clean -s make -j$(nproc) -s -EXTRA_LIBS="-lpthread -lsqlite3 -Wl,-Bstatic -L$SRC/install/lib -ltiff -lcurl -lssl -lcrypto -lz -Wl,-Bdynamic" +EXTRA_LIBS="-lpthread -Wl,-Bstatic -lsqlite3 -L$SRC/install/lib -ltiff -lcurl -lssl -lcrypto -lz -Wl,-Bdynamic" build_fuzzer() { |
