1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

nanocoap_link_format: fix off-by-one error

This commit is contained in:
Benjamin Valentin 2023-02-23 16:34:56 +01:00
parent 0cce1bc067
commit 7468c6272b

View File

@ -85,7 +85,7 @@ int nanocoap_link_format_get(nanocoap_sock_t *sock, const char *path,
char buffer[CONFIG_NANOCOAP_QS_MAX];
struct dir_list_ctx ctx = {
.buf = buffer,
.end = buffer + sizeof(buffer),
.end = buffer + sizeof(buffer) - 1,
.cur = buffer,
.cb = cb,
.ctx = arg,