Skip to content

Commit 34b2b12

Browse files
committed
wip: does this stop -fsanitize=pointer-compare complaining
1 parent 2691d04 commit 34b2b12

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

usage.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ static void __attribute__((no_sanitize ("address","pointer-subtract","pointer-co
1919
}
2020
memcpy(msg, prefix, prefix_len);
2121
p = msg + prefix_len;
22-
if (vsnprintf(p, pend - p, err, params) < 0)
22+
if (vsnprintf(p, sizeof(msg) - prefix_len, err, params) < 0)
2323
*p = '\0'; /* vsnprintf() failed, clip at prefix */
2424

2525
for (; p != pend - 1 && *p; p++) {

0 commit comments

Comments
 (0)