diff options
| author | lbr <aaoth@aaoth.xyz> | 2026-02-08 08:46:46 +0100 |
|---|---|---|
| committer | lbr <aaoth@aaoth.xyz> | 2026-02-08 08:46:46 +0100 |
| commit | 63903b9c46ad30e5007b689dc68867ae3aa13a5b (patch) | |
| tree | 28a8d95af286eca7803789d5348375b4ddd5fb8d /data.c | |
| parent | 1c2e3032e76e55883b4ea0add35ba805e16aa7ea (diff) | |
data: use lstat() instead of stat()
this disallows snac to serve a static file which is a symlink.
Diffstat (limited to 'data.c')
| -rw-r--r-- | data.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -2668,7 +2668,7 @@ static int _load_raw_file(const char *fn, xs_val **data, int *size, struct stat sb; FILE *f; - if (stat(fn, &sb) == 0 && (sb.st_mode&S_IFMT) == S_IFREG) { + if (lstat(fn, &sb) == 0 && (sb.st_mode&S_IFMT) == S_IFREG) { if ((f = fopen(fn, "rb")) != NULL) { *size = XS_ALL; *data = xs_read(f, size); |