From 15ba357fa1b309171b4a6def367b7f82724f2e55 Mon Sep 17 00:00:00 2001 From: David Timber Date: Mon, 6 Dec 2021 15:21:52 +0800 Subject: Documentation progress, bug fix, interface change * Update vscode settings for Doxygen * Fix mem leak in prne_index_bin_archive() * Fix bug where errno is not set in prne_htbt_parse_args() * Change names of parameter to prne_htbt_cp_hover() * Add template for Doxygen comment blocks --- src/protocol.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/protocol.c') diff --git a/src/protocol.c b/src/protocol.c index 6cff4a5..0ea8038 100644 --- a/src/protocol.c +++ b/src/protocol.c @@ -1124,6 +1124,7 @@ char **prne_htbt_parse_args ( while (ptr < end) { next = prne_strnchr(ptr, 0, end - ptr); if (next == NULL) { + errno = EINVAL; return NULL; // reject non-null-terminated } else { @@ -1135,6 +1136,7 @@ char **prne_htbt_parse_args ( } cnt += add_argc; if (cnt > max_args) { + errno = E2BIG; return NULL; } -- cgit