mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-06-25 10:27:24 +00:00
...
This commit is contained in:
parent
2178ff1c48
commit
fc184984a0
1 changed files with 1 additions and 1 deletions
|
|
@ -85,7 +85,7 @@ static int
|
|||
open_cache_file_without_tmpfile(const char *cache_path) {
|
||||
int fd = -1;
|
||||
static const char *template = "%s/disk-cache-XXXXXXXXXXXX";
|
||||
size_t sz = strlen(cache_path) + sizeof(template);
|
||||
const size_t sz = strlen(cache_path) + sizeof(template) + 4;
|
||||
FREE_AFTER_FUNCTION char *buf = calloc(1, sz);
|
||||
if (!buf) { errno = ENOMEM; return -1; }
|
||||
snprintf(buf, sz - 1, template, cache_path);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue