diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2025-01-24 05:51:13 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2025-01-24 05:51:13 +0000 |
| commit | 787e886ff0281e53432366cca8456c210d3a919c (patch) | |
| tree | 0a21472a3df30eb89e6657d9111f909825e0f910 | |
| parent | fix infinite loop/oom when cwd longer then 1024 (diff) | |
client: port bfabc5450b3a01c7d701809b3cf6158220ea289e to footclient
| -rw-r--r-- | client.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -401,10 +401,10 @@ main(int argc, char *const *argv) const char *cwd = custom_cwd; if (cwd == NULL) { - errno = 0; size_t buf_len = 1024; do { _cwd = xrealloc(_cwd, buf_len); + errno = 0; if (getcwd(_cwd, buf_len) == NULL && errno != ERANGE) { LOG_ERRNO("failed to get current working directory"); goto err; |
