Skip to content

Commit 83336e3

Browse files
committed
Fix from testing
1 parent e47be21 commit 83336e3

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/pk.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -737,12 +737,13 @@ static int wolfssl_print_indent(WOLFSSL_BIO* bio, char* line, int lineLen,
737737
int ret = 1;
738738

739739
if (indent > 0) {
740+
int len_wanted;
740741
/* Cap indent to buffer size to avoid format truncation warning */
741742
if (indent >= lineLen) {
742743
indent = lineLen - 1;
743744
}
744745
/* Print indent spaces. */
745-
int len_wanted = XSNPRINTF(line, (size_t)lineLen, "%*s", indent, " ");
746+
len_wanted = XSNPRINTF(line, (size_t)lineLen, "%*s", indent, " ");
746747
if ((len_wanted < 0) || (len_wanted >= lineLen)) {
747748
WOLFSSL_ERROR_MSG("Buffer overflow formatting indentation");
748749
ret = 0;

0 commit comments

Comments
 (0)