Skip to content
This repository was archived by the owner on Jan 10, 2023. It is now read-only.

Commit 7db1fc3

Browse files
committed
Fix valgrind on base32_decode
1 parent ebfa097 commit 7db1fc3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/base32.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ base32_decode(const char *user_data_untrimmed, size_t data_len, baseencode_error
131131
}
132132
}
133133

134-
size_t output_length = (size_t) ((user_data_chars + 1.6 - 1) / 1.6); // round up
134+
size_t output_length = (size_t) ((user_data_chars + 1.6 + 1) / 1.6); // round up
135135
unsigned char *decoded_data = calloc(output_length + 1, 1);
136136
if (decoded_data == NULL) {
137137
*err = MEMORY_ALLOCATION;

0 commit comments

Comments
 (0)