Hi Stolee
diff --git a/compat/win32/syslog.c b/compat/win32/syslog.c
index 1f8d8934cc9..0af18d88825 100644
--- a/compat/win32/syslog.c
+++ b/compat/win32/syslog.c
@@ -44,6 +44,7 @@ void syslog(int priority, const char *fmt, ...)
while ((pos = strstr(str, "%1")) != NULL) {
size_t offset = pos - str;
+ char *new_pos;
char *oldstr = str;
str = realloc(str, st_add(++str_len, 1));
Not related to your patch but this context line looks suspicious as
str_len is incremented without checking for overflow. I did wonder if it
should be using a post increment instead and was using the st_add() to
check if that overflowed but str_len is an int so we'd still have
undefined behavior.
Best Wishes
Phillip