Heap-OOB read in urlapi `redirect_url()` via `CURLU_GUESS_SCHEME` + `CURLU_NO_GUESS_SCHEME` flow
A heap out-of-bounds read occurs in curl's URL API when a handle is first given a scheme-less URL with scheme guessing enabled, then updated with a relative URL while scheme guessing is disabled. The code assumes the stored base URL always begins with a scheme prefix and walks past the end of a short heap buffer, though the report only demonstrates a crash under AddressSanitizer.
Originally disclosed on HackerOne
- Disclosed after 5 days
Hi all,
We've found an issue in lib/urlapi.c where redirect_url() reads past the end of a heap buffer when the source URL it operates on lacks a "scheme://" prefix. This is reachable through documented public APIs (curl_url_set) when the caller mixes CURLU_GUESS_SCHEME with a subsequent CURLU_NO_GUESS_SCHEME set on the same handle.
redirect_url() at lib/urlapi.c:1241 computes:
const char *protsep = base + strlen(scheme) + 3;
assuming base begins with "<scheme>://". But urlget_url() at lib/urlapi.c:1527-1530 deliberately omits the "scheme://" prefix when CURLU_NO_GUESS_SCHEME is set and u->guessed_scheme is true:
if(!(flags & CURLU_NO_GUESS_SCHEME) || !u->guessed_scheme)
curl_msnprintf(schemebuf, sizeof(schemebuf), "%s://", scheme);
else
schemebuf[0] = 0;
set_url() forwards the caller's flags to urlget_url and then to redirect_url. With a short host like "a.b", base is the 4-byte string "a.b/", so protsep ends up 7 bytes past the start of a 4-byte buffer, i.e. 2-3 bytes past the NUL terminator. The subsequent strchr(protsep, '/') / '?' / '#' calls walk into adjacent heap memory.
The bug requires two commits to coexist. 655d44d139 (2024-06-01, "urlapi: add CURLU_NO_GUESS_SCHEME") first taught urlget_url to emit URLs without the "scheme://" prefix when NO_GUESS_SCHEME is set on a previously-guessed scheme. Then bc24c60512 (2025-02-26, "urlapi: fix redirect from file:// with query, and simplify") added the unconditional protsep = base + strlen(scheme) + 3 pointer arithmetic in redirect_url that depends on a "scheme://" prefix being present. (The recent commit f9b9d3b141 addressed a sibling NULL-scheme variant by introducing a DEFAULT_SCHEME fallback, but the missing-prefix-due-to-guessed-scheme variant remains unfixed.)
Reproducer
Save as poc.c:
#include <stdio.h>
#include <curl/curl.h>
int main(void) {
CURLU *u = curl_url();
curl_url_set(u, CURLUPART_URL, "a.b", CURLU_GUESS_SCHEME);
curl_url_set(u, CURLUPART_URL, "/x", CURLU_NO_GUESS_SCHEME);
curl_url_cleanup(u);
return 0;
}
Build curl with ASan:
autoreconf -fi
mkdir build && cd build
CFLAGS='-O1 -g -fsanitize=address' LDFLAGS='-fsanitize=address' CC=clang \
../configure --with-openssl --enable-debug --enable-maintainer-mode --disable-shared
make -j
clang -fsanitize=address -g -I../include poc.c \
./lib/.libs/libcurl.a -lssl -lcrypto -lz -lnghttp2 -lidn2 -lzstd \
-lbrotlidec -lldap -llber -o poc
./poc
Observed output
=================================================================
==658666==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x70ef1b7e00c0 at pc 0x571b3b990b40 bp 0x7ffea09786b0 sp 0x7ffea0977e78
READ of size 34 at 0x70ef1b7e00c0 thread T0
[..]
(p.s. the above snippet is limited because for whatever reason, the poc simply hangs when running it after that ASAN message; absolutely no clue, and my local LLM couldn't tell me why either).
Suggested fix
Strip CURLU_NO_GUESS_SCHEME from the flags set_url passes through to its internal curl_url_get, so the rendered base always carries the "scheme://" prefix redirect_url assumes:
--- a/lib/urlapi.c
+++ b/lib/urlapi.c
@@ -1732,7 +1732,8 @@ static CURLUcode set_url(CURLU *u, CURLUPart part, size_t nalloc,
/* if the old URL is incomplete (we cannot get an absolute URL in
'oldurl'), replace the existing with the new */
- uc = curl_url_get(u, CURLUPART_URL, &oldurl, flags);
+ /* always include "scheme://" so redirect_url's pointer arithmetic is valid */
+ uc = curl_url_get(u, CURLUPART_URL, &oldurl, flags & ~CURLU_NO_GUESS_SCHEME);
if(uc == CURLUE_OUT_OF_MEMORY)
return uc;
else if(uc)
Cheers, AISLE Research Team
Impact
buffer overread.
Context
curl's URL API, exposed through lib/urlapi.c and the public curl_url_set / curl_url_get functions, lets an application parse, modify and re-render URLs without performing any transfer. One of the things it can do is guess a scheme for a URL that arrives without one, and later render that URL back out. The report concerns redirect_url(), an internal helper that resolves a redirect target against a base URL, and the way it interacts with two flags: CURLU_GUESS_SCHEME and CURLU_NO_GUESS_SCHEME.
The bug is a heap out-of-bounds read. When the base URL handed to redirect_url() has no scheme:// prefix, the function still computes a pointer as if the prefix were there, and then walks past the end of the buffer with strchr. The report describes this as reachable through documented public APIs when a caller mixes the two flags on the same handle.
Setup
The researcher built curl from source with AddressSanitizer. The build steps given are:
autoreconf -fi
mkdir build && cd build
CFLAGS='-O1 -g -fsanitize=address' LDFLAGS='-fsanitize=address' CC=clang \
../configure --with-openssl --enable-debug --enable-maintainer-mode --disable-shared
make -j
No account, role or remote service is involved: the reproducer is a local C program linked against the static library. The relevant precondition is a curl build that contains both of the commits described under Root cause.
Finding it
The researcher noticed that redirect_url() at lib/urlapi.c:1241 computes:
const char *protsep = base + strlen(scheme) + 3;
This assumes base begins with "<scheme>://". But urlget_url() at lib/urlapi.c:1527-1530 deliberately omits the scheme:// prefix in one case:
if(!(flags & CURLU_NO_GUESS_SCHEME) || !u->guessed_scheme)
curl_msnprintf(schemebuf, sizeof(schemebuf), "%s://", scheme);
else
schemebuf[0] = 0;
That is, when CURLU_NO_GUESS_SCHEME is set and u->guessed_scheme is true, the rendered URL has no scheme prefix at all. set_url() forwards the caller's flags to urlget_url and then to redirect_url, so the prefix-less string reaches the pointer arithmetic above.
With a short host such as "a.b", base is the 4-byte string "a.b/". Adding strlen(scheme) + 3 puts protsep 7 bytes past the start of a 4-byte buffer, which is 2 to 3 bytes past the NUL terminator. The subsequent strchr(protsep, '/'), strchr(protsep, '?') and strchr(protsep, '#') calls then walk into adjacent heap memory.
Exploitation
Step 1: write the reproducer
The program creates a URL handle, sets a bare host with scheme guessing enabled, then sets a path on the same handle with guessing disabled.
#include <stdio.h>
#include <curl/curl.h>
int main(void) {
CURLU *u = curl_url();
curl_url_set(u, CURLUPART_URL, "a.b", CURLU_GUESS_SCHEME);
curl_url_set(u, CURLUPART_URL, "/x", CURLU_NO_GUESS_SCHEME);
curl_url_cleanup(u);
return 0;
}
The first curl_url_set stores a.b and marks the scheme as guessed. The second call goes through set_url(), which renders the existing URL with the caller's flags, producing a base without the scheme:// prefix, and passes it to redirect_url() to resolve /x against it.
Step 2: build and run against the ASan build
clang -fsanitize=address -g -I../include poc.c \
./lib/.libs/libcurl.a -lssl -lcrypto -lz -lnghttp2 -lidn2 -lzstd \
-lbrotlidec -lldap -llber -o poc
./poc
Step 3: observe the sanitizer report
=================================================================
==658666==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x70ef1b7e00c0 at pc 0x571b3b990b40 bp 0x7ffea09786b0 sp 0x7ffea0977e78
READ of size 34 at 0x70ef1b7e00c0 thread T0
[..]
AddressSanitizer reports a heap-buffer-overflow read. The researcher notes that the snippet is limited because the program simply hangs after the ASan message, and that they had no explanation for the hang.
Root cause
Two commits have to coexist for the bug to exist:
655d44d139(2024-06-01, "urlapi: add CURLU_NO_GUESS_SCHEME") taughturlget_urlto emit URLs without thescheme://prefix whenNO_GUESS_SCHEMEis set on a previously guessed scheme.bc24c60512(2025-02-26, "urlapi: fix redirect from file:// with query, and simplify") added the unconditionalprotsep = base + strlen(scheme) + 3pointer arithmetic inredirect_url, which depends on the prefix being present.
The recent commit f9b9d3b141 addressed a sibling NULL-scheme variant by introducing a DEFAULT_SCHEME fallback, but the missing-prefix-due-to-guessed-scheme variant remains unfixed. In short, one code path can produce a base string without the prefix, and another code path assumes the prefix unconditionally; the flags are forwarded between them without reconciling the two assumptions.
Impact
The report describes the impact simply as a buffer overread. The read happens in the caller's own process when it uses the documented URL API in the flag combination above; the report does not describe a path by which a remote party controls the flags or the input, so any wider consequence is not established here.
Fix
The suggested fix strips CURLU_NO_GUESS_SCHEME from the flags that set_url passes to its internal curl_url_get, so the rendered base always carries the scheme:// prefix that redirect_url assumes:
--- a/lib/urlapi.c
+++ b/lib/urlapi.c
@@ -1732,7 +1732,8 @@ static CURLUcode set_url(CURLU *u, CURLUPart part, size_t nalloc,
/* if the old URL is incomplete (we cannot get an absolute URL in
'oldurl'), replace the existing with the new */
- uc = curl_url_get(u, CURLUPART_URL, &oldurl, flags);
+ /* always include "scheme://" so redirect_url's pointer arithmetic is valid */
+ uc = curl_url_get(u, CURLUPART_URL, &oldurl, flags & ~CURLU_NO_GUESS_SCHEME);
if(uc == CURLUE_OUT_OF_MEMORY)
return uc;
else if(uc)
A positive result is an ASan heap-buffer-overflow report from the same redirect_url path.
A positive result is the same overread triggered from a different branch.
A positive result is any other path where a prefix-less base reaches redirect_url.
A positive result is a clean run for the former and an ASan report for the latter.
What happened, in plain words
curl is a very widely used piece of software for moving data around the internet. Most people meet it as the curl command in a terminal, but it is also a library: a collection of ready-made code that other programs can call to do the same job. This report is about the library side, and specifically about a part of it that deals with web addresses (URLs) without actually downloading anything.
That part is called the URL API. An API, short for application programming interface, is a defined set of functions that one program offers to another. Think of it as a restaurant menu: you do not walk into the kitchen, you order from the menu and the kitchen does the work. Here the menu is a handful of functions such as curl_url_set (store or change a URL) and curl_url_get (read a URL back out).
The URL API can do something convenient: if you hand it a web address that has no http:// or https:// at the front, it can guess which one you meant. The report is about a bug that appears when a program first asks curl to guess, and then, on the same URL, asks curl not to guess. In that combination, an internal helper function reads a few bytes past the end of a small block of memory. Reading past the end of memory is called an out-of-bounds read, and when the memory in question is a heap buffer (a small chunk of memory handed out by the program at runtime), it is a heap out-of-bounds read.
The report is signed by the AISLE Research Team.
A quick word on why anyone cares. Programs store data in memory, and memory has edges. If code reads past the edge of a buffer, it may pick up whatever happens to sit next to it. Sometimes that is harmless garbage; sometimes it is data the program was never meant to expose, and sometimes it makes the program crash. Security researchers look for these edges because they are the raw material of many bigger problems.
Context
The URL API lives in a source file called lib/urlapi.c. Its job is to take a URL apart (scheme, host, path and so on), let the program change the pieces, and put it back together as text. It does not contact any server; it is pure text handling.
Two flags matter here. A flag is a small on/off switch you pass to a function to change its behaviour, like a checkbox on a form. CURLU_GUESS_SCHEME means "if the URL has no scheme, guess one". CURLU_NO_GUESS_SCHEME means "do not add a guessed scheme when rendering the URL back out".
The internal helper at the centre of the report is redirect_url(). When a server tells a browser or a client "go to this other address instead", that is a redirect. redirect_url() takes a base URL and a redirect target and works out the full address the target points to. For example, if the base is http://example.com/dir/page and the target is /other, the result is http://example.com/other.
The bug is a heap out-of-bounds read. When the base URL given to redirect_url() has no scheme:// prefix (no http:// style beginning), the function still calculates a position as if the prefix were there, and then searches forward from that position with a standard C function called strchr, which looks for a character in a string. Because the starting position is already past the end of the buffer, the search walks into memory that does not belong to the string. The report says this is reachable through documented public APIs when a caller mixes the two flags on the same handle. A handle is an object the library gives you to keep track of one URL; you create it, use it, and free it.
Setup
The researcher built curl from source, meaning they downloaded the code and compiled it themselves rather than using a pre-packaged version. They compiled it with AddressSanitizer, usually shortened to ASan. ASan is a tool built into the compiler that adds checks around memory accesses; when a program reads or writes outside a buffer, ASan stops it and prints a detailed report instead of letting the mistake pass silently. It is like putting motion sensors around every shelf in a warehouse so that reaching past the edge sets off an alarm.
The build steps given are:
autoreconf -fi
mkdir build && cd build
CFLAGS='-O1 -g -fsanitize=address' LDFLAGS='-fsanitize=address' CC=clang \
../configure --with-openssl --enable-debug --enable-maintainer-mode --disable-shared
make -j
Line by line:
autoreconf -firegenerates the build scripts that come with the curl source tree, so the next step has something to run.mkdir build && cd buildcreates a separate folder for the build output and moves into it. Keeping build files apart from source files is a common habit.- The
CFLAGSline tells the compiler to use optimisation level 1 (-O1), to include debugging information (-g), and to switch on AddressSanitizer (-fsanitize=address).LDFLAGSdoes the same for the linking stage, where the final program is assembled.CC=clangselects the clang compiler. ../configure ...runs curl's configuration script.--with-opensslbuilds against the OpenSSL library for encrypted connections,--enable-debugturns on extra internal checks,--enable-maintainer-modeenables stricter developer warnings, and--disable-sharedbuilds a static library (a single file that gets copied into programs that use it) rather than a shared one (loaded at runtime).make -jcompiles everything, using several processor cores in parallel.
No account, role or remote service is involved: the reproducer is a local C program linked against the static library. The relevant precondition is a curl build that contains both of the commits described under Root cause. A commit is a saved change in a version-control system; each one has a short identifier such as 655d44d139.
Finding it
The researcher noticed that redirect_url() at lib/urlapi.c:1241 computes:
const char *protsep = base + strlen(scheme) + 3;
This line creates a pointer, a variable that holds a memory address rather than a value. base points at the start of the URL text. strlen(scheme) measures how many characters the scheme name has (for http that is 4). Adding 3 skips the :// that normally follows the scheme. So the pointer is meant to land on the first character after http://, which is where the host begins. The name protsep is short for protocol separator.
This assumes base begins with "<scheme>://". But urlget_url() at lib/urlapi.c:1527-1530 deliberately omits the scheme:// prefix in one case:
if(!(flags & CURLU_NO_GUESS_SCHEME) || !u->guessed_scheme)
curl_msnprintf(schemebuf, sizeof(schemebuf), "%s://", scheme);
else
schemebuf[0] = 0;
Line by line:
- The
ifchecks two things joined by||(logical OR, meaning "either"). The first part,!(flags & CURLU_NO_GUESS_SCHEME), is true when the no-guess flag is not set. The&here is a bitwise AND, a way of testing whether a particular switch is on inside a packed set of switches. The second part,!u->guessed_scheme, is true when the scheme was not guessed. If either is true, the code takes the first branch. - In the first branch,
curl_msnprintfwrites the scheme followed by://into a small buffer calledschemebuf.sizeof(schemebuf)caps how much can be written, so the buffer cannot overflow. - In the
elsebranch, which runs only when the no-guess flag is set and the scheme was guessed,schemebuf[0] = 0writes a single zero byte. In C, a zero byte marks the end of a string, so this makes the buffer an empty string: no scheme prefix at all.
That is, when CURLU_NO_GUESS_SCHEME is set and u->guessed_scheme is true, the rendered URL has no scheme prefix at all. set_url() forwards the caller's flags to urlget_url and then to redirect_url, so the prefix-less string reaches the pointer arithmetic above. Forwarding means passing the same switches along to the next function, like handing your order slip to the next station in a kitchen.
With a short host such as "a.b", base is the 4-byte string "a.b/". The four bytes are a, ., b and /; the zero byte that ends the string sits just after them. Adding strlen(scheme) + 3 puts protsep 7 bytes past the start of a 4-byte buffer, which is 2 to 3 bytes past the NUL terminator. The NUL terminator is that zero byte marking the end. The subsequent strchr(protsep, '/'), strchr(protsep, '?') and strchr(protsep, '#') calls then walk into adjacent heap memory. strchr searches a string for a character; given a starting point beyond the end of the string, it keeps reading whatever bytes follow in memory until it happens to find the character or a zero byte.
Exploitation
Step 1: write the reproducer
A reproducer is a small, self-contained program that triggers a bug on demand, so that others can confirm it. The program creates a URL handle, sets a bare host with scheme guessing enabled, then sets a path on the same handle with guessing disabled.
#include <stdio.h>
#include <curl/curl.h>
int main(void) {
CURLU *u = curl_url();
curl_url_set(u, CURLUPART_URL, "a.b", CURLU_GUESS_SCHEME);
curl_url_set(u, CURLUPART_URL, "/x", CURLU_NO_GUESS_SCHEME);
curl_url_cleanup(u);
return 0;
}
Line by line:
#include <stdio.h>pulls in the standard input/output declarations.#include <curl/curl.h>pulls in curl's own declarations, so the compiler knows whatcurl_url,curl_url_setandcurl_url_cleanuplook like.int main(void) {starts the program's entry point.CURLU *u = curl_url();asks curl for a new URL handle and stores it inu. The*meansuis a pointer to aCURLUstructure.curl_url_set(u, CURLUPART_URL, "a.b", CURLU_GUESS_SCHEME);stores the whole URLa.bin the handle, with the guess-scheme switch on. Becausea.bhas no scheme, curl guesses one and remembers that it guessed.curl_url_set(u, CURLUPART_URL, "/x", CURLU_NO_GUESS_SCHEME);sets a new URL on the same handle, this time with the no-guess switch on. This is the step that triggers the bug.curl_url_cleanup(u);frees the handle's memory.return 0;ends the program successfully.
The first curl_url_set stores a.b and marks the scheme as guessed. The second call goes through set_url(), which renders the existing URL with the caller's flags, producing a base without the scheme:// prefix, and passes it to redirect_url() to resolve /x against it. Resolving means combining a relative address with a base to get a full one, the same way a browser turns a link on a page into a complete address.
Step 2: build and run against the ASan build
clang -fsanitize=address -g -I../include poc.c \
./lib/.libs/libcurl.a -lssl -lcrypto -lz -lnghttp2 -lidn2 -lzstd \
-lbrotlidec -lldap -llber -o poc
./poc
Line by line:
clang -fsanitize=address -gcompiles with the same AddressSanitizer and debug information as the library, so the checks line up.-I../includetells the compiler where to find curl's header files.poc.cis the source file, and./lib/.libs/libcurl.ais the static curl library built in the previous step.- The
-loptions list the other libraries curl needs: OpenSSL for cryptography, zlib and zstd and brotli for compression, nghttp2 for HTTP/2, libidn2 for international domain names, and LDAP libraries. The linker needs them because the static library does not carry them inside itself. -o pocnames the output programpoc../pocruns it.
Step 3: observe the sanitizer report
=================================================================
==658666==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x70ef1b7e00c0 at pc 0x571b3b990b40 bp 0x7ffea09786b0 sp 0x7ffea0977e78
READ of size 34 at 0x70ef1b7e00c0 thread T0
[..]
This is ASan's alarm going off. heap-buffer-overflow names the kind of mistake: an access outside a heap buffer. READ of size 34 says the program tried to read 34 bytes starting at the address shown. The pc, bp and sp values are processor register contents at the moment of the fault, useful to a developer. thread T0 says it happened on the main thread. The [..] marks where the report continues with a stack trace, the list of function calls that led to the fault.
AddressSanitizer reports a heap-buffer-overflow read. The researcher notes that the snippet is limited because the program simply hangs after the ASan message, and that they had no explanation for the hang. A hang means the program stops making progress without exiting.
Root cause
Root cause means the underlying reason the bug exists, as opposed to the symptom you see. Two commits have to coexist for the bug to exist:
655d44d139(2024-06-01, "urlapi: add CURLU_NO_GUESS_SCHEME") taughturlget_urlto emit URLs without thescheme://prefix whenNO_GUESS_SCHEMEis set on a previously guessed scheme.bc24c60512(2025-02-26, "urlapi: fix redirect from file:// with query, and simplify") added the unconditionalprotsep = base + strlen(scheme) + 3pointer arithmetic inredirect_url, which depends on the prefix being present. Unconditional means it runs every time, with no check that the prefix is actually there.
The recent commit f9b9d3b141 addressed a sibling NULL-scheme variant by introducing a DEFAULT_SCHEME fallback, but the missing-prefix-due-to-guessed-scheme variant remains unfixed. A sibling variant is a closely related case of the same underlying mistake. A fallback is a default value used when the expected one is missing. In short, one code path can produce a base string without the prefix, and another code path assumes the prefix unconditionally; the flags are forwarded between them without reconciling the two assumptions. Reconciling here would mean making sure both sides agree on whether the prefix is present.
Impact
The report describes the impact simply as a buffer overread. The read happens in the caller's own process when it uses the documented URL API in the flag combination above; the report does not describe a path by which a remote party controls the flags or the input, so any wider consequence is not established here. In plain terms: a program that uses curl's URL API in this particular way can read a few bytes of its own memory that it should not, and the report does not show how an attacker elsewhere on the network could cause that to happen.
Fix
The suggested fix strips CURLU_NO_GUESS_SCHEME from the flags that set_url passes to its internal curl_url_get, so the rendered base always carries the scheme:// prefix that redirect_url assumes:
--- a/lib/urlapi.c
+++ b/lib/urlapi.c
@@ -1732,7 +1732,8 @@ static CURLUcode set_url(CURLU *u, CURLUPart part, size_t nalloc,
/* if the old URL is incomplete (we cannot get an absolute URL in
'oldurl'), replace the existing with the new */
- uc = curl_url_get(u, CURLUPART_URL, &oldurl, flags);
+ /* always include "scheme://" so redirect_url's pointer arithmetic is valid */
+ uc = curl_url_get(u, CURLUPART_URL, &oldurl, flags & ~CURLU_NO_GUESS_SCHEME);
if(uc == CURLUE_OUT_OF_MEMORY)
return uc;
else if(uc)
This is a diff, the standard format for showing a change to a source file. Lines starting with - are removed and lines starting with + are added; the @@ line says where in the file the change sits. The old line passed flags unchanged to curl_url_get. The new line passes flags & ~CURLU_NO_GUESS_SCHEME: the ~ flips every bit of the flag value, and the & then keeps every flag except that one. The effect is that the no-guess switch is switched off for this internal call only, so the URL is always rendered with its scheme:// prefix, which is what redirect_url expects. The added comment states that reasoning in the code itself.
Each one names what a positive result would look like.
A positive result is an ASan heap-buffer-overflow report from the same redirect_url path.
A positive result is the same overread triggered from a different branch.
A positive result is any other path where a prefix-less base reaches redirect_url.
A positive result is a clean run for the former and an ASan report for the latter.
Glossary
- API: a defined set of functions one program offers to another, like a menu you order from.
- AddressSanitizer (ASan): a compiler feature that detects out-of-bounds and other memory mistakes at runtime and prints a report.
- Base URL: the reference address that a relative link is resolved against.
- Bitwise AND (
&): an operation that compares the individual bits of two values, often used to test or clear switches packed into one number. - Buffer: a block of memory set aside to hold data such as text.
- Buffer over-read: reading data past the end of a buffer.
- Commit: a saved change in a version-control system, identified by a short hash.
- curl: a command-line tool and library for transferring data over networks.
- curl_url_set / curl_url_get: curl's public functions for storing and reading a URL in a handle.
- Diff: a text format showing lines removed from and added to a file.
- Flag: an on/off switch passed to a function to change its behaviour.
- Handle: an object a library gives you to keep track of one item, here one URL.
- Heap: the area of memory a program uses for data allocated at runtime.
- Heap buffer: a block of memory allocated at runtime from the heap.
- Heap out-of-bounds read: reading memory outside a heap buffer.
- Library: a collection of pre-written code that other programs can call.
- NUL terminator: the zero byte that marks the end of a string in C.
- Out-of-bounds read: reading memory outside the intended range.
- Pointer: a variable that holds a memory address.
- Redirect: a server instruction to go to a different address instead.
- Reproducer: a small program that triggers a bug on demand.
- Root cause: the underlying reason a bug exists.
- Scheme: the part of a URL before
://, such ashttporhttps. - Static library: a compiled library copied into programs that use it, rather than loaded at runtime.
- strchr: a C function that searches a string for a character.
- strlen: a C function that returns the length of a string.
- URL: a web address.
- URL API: curl's set of functions for parsing and building URLs without transferring data.
- Variant: a closely related case of the same underlying issue.