format: Fix out-of-bounds reads for strings

This commit is contained in:
Alexis Engelke
2023-04-16 17:53:47 +02:00
parent 0297f66de6
commit 239be46d4a

View File

@@ -26,7 +26,7 @@ struct FdStr {
unsigned sz;
};
#define fd_stre(s) ((struct FdStr) { (s "\0\0\0\0\0\0\0\0\0\0"), sizeof (s)-1 })
#define fd_stre(s) ((struct FdStr) { (s "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"), sizeof (s)-1 })
static char*
fd_strpcat(char* restrict dst, struct FdStr src) {