aboutsummaryrefslogtreecommitdiff
path: root/src/protocol.c
diff options
context:
space:
mode:
authorDavid Timber <mieabby@gmail.com>2021-12-06 15:21:52 +0800
committerDavid Timber <mieabby@gmail.com>2021-12-06 15:21:52 +0800
commit15ba357fa1b309171b4a6def367b7f82724f2e55 (patch)
treeab2856478a9e5c8764c002bac46194e4e38de4f3 /src/protocol.c
parentf5d9956c3e2343455a3025b9d38c539b680da8f5 (diff)
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
Diffstat (limited to 'src/protocol.c')
-rw-r--r--src/protocol.c2
1 files changed, 2 insertions, 0 deletions
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;
}