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 <agl@google.com>
Commit-Queue: Adam Langley <agl@google.com>
diff --git a/crypto/poly1305/poly1305.c b/crypto/poly1305/poly1305.c
index 2eb3974..e4e6298 100644
--- a/crypto/poly1305/poly1305.c
+++ b/crypto/poly1305/poly1305.c
@@ -204,6 +204,11 @@
                             size_t in_len) {
   struct poly1305_state_st *state = poly1305_aligned_state(statep);
 
+  // Work around a C language bug. See https://crbug.com/1019588.
+  if (in_len == 0) {
+    return;
+  }
+
 #if defined(OPENSSL_POLY1305_NEON)
   if (CRYPTO_is_NEON_capable()) {
     CRYPTO_poly1305_update_neon(statep, in, in_len);