diff options
author | Xavier Roche <roche@httrack.com> | 2023-01-14 13:06:22 +0100 |
---|---|---|
committer | Xavier Roche <roche@httrack.com> | 2023-01-14 15:12:07 +0100 |
commit | 340c0d940fbaccf0b69946fff9418bbb1303798f (patch) | |
tree | 52244d375891fb489b54dfab3bc8f4de3c4e9406 /src/proxy/store.c | |
parent | 78df0864a76d1543e8c97df75f125424a8e97250 (diff) |
Fixed sprintf
Diffstat (limited to 'src/proxy/store.c')
-rw-r--r-- | src/proxy/store.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/proxy/store.c b/src/proxy/store.c index 81c22ef..07956be 100644 --- a/src/proxy/store.c +++ b/src/proxy/store.c @@ -1130,7 +1130,7 @@ static PT_Element PT_ReadCache__New_u(PT_Index index_, const char *url, sprintf(previous_save, "%s%s", index->path, previous_save_ + index->fixedPath); } else { - sprintf(r->msg, "Bogus fixePath prefix for %s (prefixLen=%d)", + snprintf(r->msg, sizeof(r->msg), "Bogus fixePath prefix for %s (prefixLen=%d)", previous_save_, (int) index->fixedPath); r->statuscode = STATUSCODE_INVALID; } @@ -1178,7 +1178,7 @@ static PT_Element PT_ReadCache__New_u(PT_Index index_, const char *url, fclose(fp); } else { r->statuscode = STATUSCODE_INVALID; - sprintf(r->msg, "Read error (can't open '%s') from cache", + snprintf(r->msg, sizeof(r->msg), "Read error (can't open '%s') from cache", file_convert(catbuff, sizeof(catbuff), previous_save)); } } else { @@ -1745,7 +1745,7 @@ static PT_Element PT_ReadCache__Old_u(PT_Index index_, const char *url, sprintf(previous_save, "%s%s", index->path, previous_save_ + index->fixedPath); } else { - sprintf(r->msg, "Bogus fixePath prefix for %s (prefixLen=%d)", + snprintf(r->msg, sizeof(r->msg), "Bogus fixePath prefix for %s (prefixLen=%d)", previous_save_, (int) index->fixedPath); r->statuscode = STATUSCODE_INVALID; } |