~sircmpwn/gmni-devel

gmni: fix wrong path length check and error message v1 APPLIED

René Wagner: 1
 fix wrong path length check and error message

 1 files changed, 2 insertions(+), 2 deletions(-)
Export patchset (mbox)
How do I use this?

Copy & paste the following snippet into your terminal to import this patchset into git:

curl -s https://lists.sr.ht/~sircmpwn/gmni-devel/patches/26174/mbox | git am -3
Learn more about email & git
View this thread in the archives

[PATCH gmni] fix wrong path length check and error message Export this patch

---
In download_resp() the length check for the default
path handler checked the wrong buffer...missed that
one in the last patch.

 src/util.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/util.c b/src/util.c
index dd1fa37..45704e7 100644
--- 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);
-- 
2.33.1
Thanks!

To git@git.sr.ht:~sircmpwn/gmni
   ff46c84..78fe3fb  master -> master