Skip to content

Commit 4984e4a

Browse files
davidbenBoringssl LUCI CQ
authored and
Boringssl LUCI CQ
committed
Work around another C language bug with empty spans.
This is another instance of https://boringssl-review.googlesource.com/c/boringssl/+/38584. We missed it because our UBSan bots only run on x86-64, which uses a different version of this function. See also https://bugs.fuchsia.dev/p/fuchsia/issues/detail?id=96307 Change-Id: Ib27eaca581c27fe9b7fd0e532d1a0e2850cb83d4 Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/52125 Reviewed-by: Adam Langley <[email protected]> Commit-Queue: Adam Langley <[email protected]>
1 parent f94a7ce commit 4984e4a

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

crypto/poly1305/poly1305.c

+5
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,11 @@ void CRYPTO_poly1305_update(poly1305_state *statep, const uint8_t *in,
204204
size_t in_len) {
205205
struct poly1305_state_st *state = poly1305_aligned_state(statep);
206206

207+
// Work around a C language bug. See https://crbug.com/1019588.
208+
if (in_len == 0) {
209+
return;
210+
}
211+
207212
#if defined(OPENSSL_POLY1305_NEON)
208213
if (CRYPTO_is_NEON_capable()) {
209214
CRYPTO_poly1305_update_neon(statep, in, in_len);

0 commit comments

Comments
 (0)