commit 78fe3fbb2bc3a8e3228a51aed1f203e521cdf845
parent ff46c840c5b1c3dfe9aadac828d3deb3b3798c9b
Author: René Wagner <rwagner@rw-net.de>
Date: Wed, 3 Nov 2021 16:24:00 +0100
fix wrong path length check and error message
Diffstat:
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/util.c b/src/util.c
@@ -82,9 +82,9 @@ download_resp(FILE *out, struct gemini_response resp, const char *path,
}
break;
default:
- if (strlen(path_buf) > PATH_MAX) {
+ if (strlen(path) > PATH_MAX) {
fprintf(stderr, "Path %s exceeds limit of %d bytes\n",
- path_buf, PATH_MAX);
+ path, PATH_MAX);
return 1;
}
strcpy(path_buf, path);