File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed
Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,9 @@ Breaking changes:
55Features:
66* new attribute 'check_timeout' on `host` and `service` structs, overrides the global host / service check timeouts. (#525)
77
8+ Bugfixes:
9+ * fix memory corruption in `mkstr` caused by integer overflow (#527)
10+
8111.5.0 - Feb 03 2026
912===================
1013Breaking changes:
Original file line number Diff line number Diff line change @@ -70,7 +70,7 @@ float tv_delta_f(const struct timeval *start, const struct timeval *stop)
7070
7171/* format duration seconds into human readable string */
7272const char * tv_str (struct timeval * tv ) {
73- return (char * )mkstr ("%lu.%06lu " , tv -> tv_sec , tv -> tv_usec );
73+ return (char * )mkstr ("%lld.%06ld " , ( long long ) tv -> tv_sec , ( long ) tv -> tv_usec );
7474}
7575
7676 /* Convert string to timeval */
@@ -94,7 +94,7 @@ int str2timeval(char *str, struct timeval *tv)
9494const char * mkstr (const char * fmt , ...)
9595{
9696 static char buf [MKSTR_BUFS ][32 ]; /* 8k statically on the stack */
97- static int slot = 0 ;
97+ static unsigned int slot = 0 ;
9898 char * ret ;
9999
100100 va_list ap ;
You can’t perform that action at this time.
0 commit comments