fix crash (#20028)
Costa Tsaousis committed
Apr 1, 2025 at 23:12 UTC
4ea9384647277619b282d05f2c3825de71e4e268
1 file changed
+3
-1
src/daemon/status-file.c
+3
-1
@@ -128,7 +128,9 @@ static void dmi_info(const char *file, const char *alt, char *dst, size_t dst_si
128
}
129
130
char *s = trim_all(dst);
131
- if(s != dst)
131
+ if(!s)
132
+ dst[0] = '\0';
133
+ else if(s != dst)
134
memmove(dst, s, strlen(s) + 1);
135
136
struct {