commit | 6bd1e1504670dc96a76eb9858da4117bba586a41 | [log] [tgz] |
---|---|---|
author | David Benjamin <davidben@google.com> | Wed Jul 19 13:56:50 2023 -0400 |
committer | Boringssl LUCI CQ <boringssl-scoped@luci-project-accounts.iam.gserviceaccount.com> | Wed Jul 19 18:47:48 2023 +0000 |
tree | 71e07239dbbaa9f2df7955f7b93c41ac28097219 | |
parent | df13691019be62da728e0c63463fe51bb5d7c29d [diff] |
Silence -Wformat-truncation warning in crypto/err/err.c This warning was being tripped because lib_buf and reason_buf made GCC, incorrectly, believe that the strings could get that long, and then attempted to sum up the snprintf to 120, obtained by inlining some things. Those buffers were larger than they needed to be, so bringing it down is sufficient to silence things. That said, the buffer bounds are supplied by the caller and it is expected that truncation can occur, so the warning is just incorrect. The warning can also be silenced by checking the snprintf return value. As we're already trying to detect truncation, we may as well do it with the return value and skip the extra strlen call. Either of the two changes is sufficient to suppress the warning, but both seem worthwhile, so I've done them both. Change-Id: Ia1b1de67bba55da6f0d07e3682165a1820ce2c9e Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/61805 Auto-Submit: David Benjamin <davidben@google.com> Reviewed-by: Bob Beck <bbe@google.com> Commit-Queue: Bob Beck <bbe@google.com>
BoringSSL is a fork of OpenSSL that is designed to meet Google's needs.
Although BoringSSL is an open source project, it is not intended for general use, as OpenSSL is. We don't recommend that third parties depend upon it. Doing so is likely to be frustrating because there are no guarantees of API or ABI stability.
Programs ship their own copies of BoringSSL when they use it and we update everything as needed when deciding to make API changes. This allows us to mostly avoid compromises in the name of compatibility. It works for us, but it may not work for you.
BoringSSL arose because Google used OpenSSL for many years in various ways and, over time, built up a large number of patches that were maintained while tracking upstream OpenSSL. As Google's product portfolio became more complex, more copies of OpenSSL sprung up and the effort involved in maintaining all these patches in multiple places was growing steadily.
Currently BoringSSL is the SSL library in Chrome/Chromium, Android (but it's not part of the NDK) and a number of other apps/programs.
Project links:
There are other files in this directory which might be helpful: