mirror of
https://git.sr.ht/~sircmpwn/gmni
synced 2024-11-26 10:53:46 +01:00
fix wrong path length check and error message
This commit is contained in:
parent
ff46c840c5
commit
78fe3fbb2b
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user