Skip to content

Commit 194854b

Browse files
committed
Fix format security warning in newer GCC
In OpenWrt, -Werror=format-string is passed, making this fail compilation. printf style functions are meant to work with format strings anyway.
1 parent 7879bf3 commit 194854b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/io.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ nc_ssl_error_get_reasons(void)
6262
ERRMEM;
6363
return NULL;
6464
}
65-
reason_len += sprintf(reasons + reason_len, ERR_reason_error_string(e));
65+
reason_len += sprintf(reasons + reason_len, "%s", ERR_reason_error_string(e));
6666
}
6767

6868
return reasons;

0 commit comments

Comments
 (0)