diff options
| author | Daniel Stenberg <daniel@haxx.se> | 2019-03-04 13:08:44 +0100 |
|---|---|---|
| committer | Daniel Stenberg <daniel@haxx.se> | 2019-03-04 13:08:44 +0100 |
| commit | 34cd05fc52ad364f43554cb72ef7e1c087c8d4f8 (patch) | |
| tree | fdbc4a19f47d2270904690aa8ee5de686ff05b8e | |
| parent | 646c6eb6854b2f1ea134e6cc58fdf6406d4cade1 (diff) | |
| download | curl-bagder/gopher-path-null.tar.gz | |
fixup use an assert for pathbagder/gopher-path-null
| -rw-r--r-- | lib/gopher.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/gopher.c b/lib/gopher.c index 2b2683573..b296c62d1 100644 --- a/lib/gopher.c +++ b/lib/gopher.c @@ -79,7 +79,6 @@ static CURLcode gopher_do(struct connectdata *conn, bool *done) struct Curl_easy *data = conn->data; curl_socket_t sockfd = conn->sock[FIRSTSOCKET]; char *gopherpath; - /* path is guaranteed non-NULL */ char *path = data->state.up.path; char *query = data->state.up.query; char *sel = NULL; @@ -89,6 +88,9 @@ static CURLcode gopher_do(struct connectdata *conn, bool *done) *done = TRUE; /* unconditionally */ + /* path is guaranteed non-NULL */ + DEBUGASSERT(path); + if(query) gopherpath = aprintf("%s?%s", path, query); else |
