1
0
Fork 0
mirror of https://git.sr.ht/~sircmpwn/gmni synced 2024-05-07 21:56:03 +02:00

fix wrong path length check and error message

This commit is contained in:
René Wagner 2021-11-03 16:24:00 +01:00 committed by Drew DeVault
parent ff46c840c5
commit 78fe3fbb2b

View File

@ -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);