GCC 12 triggers a -Warray-bounds false positive in crypto/x509v3's IPv6 parser. Although v6stat.total cannot exceed 16 because of the callback, GCC doesn't know this and seems to get confused. Checking >= 16 seems to silence it. While I'm here, move the comments so they don't obscure the if/else-if chains and avoid a theoretical overflow in 'zero_cnt' by checking for the maximum value inside the callback. Change-Id: If1610a36693915aa92085d8cb3a4709ae82992ba Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/54245 Reviewed-by: Adam Langley <agl@google.com> Auto-Submit: David Benjamin <davidben@google.com> Commit-Queue: David Benjamin <davidben@google.com>chromium-5359
parent
2749466282
commit
8462a367bb
1 changed files with 16 additions and 19 deletions
Loading…
Reference in new issue