Skip to content

Commit 6bb2ba3

Browse files
arrowdTheAssassin
authored andcommitted
Fix nullptr dereferencing in the verbose path
1 parent f3431ca commit 6bb2ba3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/appimagetool_fetch_runtime.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ class GetRequest {
156156
foundFile = true;
157157
} else {
158158
if (verbose) {
159-
std::cerr << "libcurl's default CA certificate bundle file " << caInfo << " was not found on this system, nulling" << std::endl;
159+
std::cerr << "libcurl's default CA certificate bundle file " << (caInfo ? caInfo : "") << " was not found on this system, nulling" << std::endl;
160160
}
161161
setOption(CURLOPT_CAINFO, "");
162162
}
@@ -172,7 +172,7 @@ class GetRequest {
172172
foundDir = true;
173173
} else {
174174
if (verbose) {
175-
std::cerr << "libcurl's default CA certificate bundle directory " << caPath << " was not found on this system, nulling" << std::endl;
175+
std::cerr << "libcurl's default CA certificate bundle directory " << (caPath ? caPath : "") << " was not found on this system, nulling" << std::endl;
176176
}
177177
setOption(CURLOPT_CAPATH, "");
178178
}

0 commit comments

Comments
 (0)