mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-25 14:29:03 +08:00
f8f5998162
* wolfSSL updates * [wolfSSL] from 5.5.0 -> 5.5.4 * [wolfTPM] from 2.6.0 -> 2.7.0 * [wolfMQTT] from 1.14.1 -> 1.15.0 * Update ports/wolftpm/portfile.cmake If there is no patch, delete it. * [wolfssl] remove comments from patch pr_5949.patch * [wolfmqtt] remove PATCHES since no longer needed * [wolfmqtt] update git tree hash for version 1.15.0 * [wolfssl/wolftpm] update version database --------- Co-authored-by: MonicaLiu <110024546+MonicaLiu0311@users.noreply.github.com> Co-authored-by: Billy Robert O'Neal III <bion@microsoft.com>
47 lines
1.6 KiB
Diff
47 lines
1.6 KiB
Diff
diff --git a/src/internal.c b/src/internal.c
|
|
index 1afa361f9d0..c17158b34cd 100644
|
|
--- a/src/internal.c
|
|
+++ b/src/internal.c
|
|
@@ -12781,9 +12781,17 @@ static int ProcessPeerCertParse(WOLFSSL* ssl, ProcPeerCertArgs* args,
|
|
return BAD_FUNC_ARG;
|
|
}
|
|
|
|
+PRAGMA_GCC_DIAG_PUSH
|
|
+PRAGMA_GCC("GCC diagnostic ignored \"-Wstrict-overflow\"")
|
|
+ /* Surrounded in gcc pragma to avoid -Werror=strict-overflow when the
|
|
+ * compiler optimizes out the check and assumes no underflow. Keeping the
|
|
+ * check in place to handle multiple build configurations and future
|
|
+ * changes. */
|
|
+
|
|
/* check to make sure certificate index is valid */
|
|
if (args->certIdx > args->count)
|
|
return BUFFER_E;
|
|
+PRAGMA_GCC_DIAG_POP
|
|
|
|
/* check if returning from non-blocking OCSP */
|
|
/* skip this section because cert is already initialized and parsed */
|
|
|
|
diff --git a/wolfcrypt/src/sp_int.c b/wolfcrypt/src/sp_int.c
|
|
index b5199ed7352..cbff871f08a 100644
|
|
--- a/wolfcrypt/src/sp_int.c
|
|
+++ b/wolfcrypt/src/sp_int.c
|
|
@@ -4822,6 +4822,10 @@ int sp_copy(const sp_int* a, sp_int* r)
|
|
}
|
|
/* Only copy if different pointers. */
|
|
else if (a != r) {
|
|
+ PRAGMA_GCC_DIAG_PUSH
|
|
+ PRAGMA_GCC("GCC diagnostic ignored \"-Wstrict-overflow\"")
|
|
+ /* Surrounded in gcc pragma to avoid -Werror=strict-overflow when the
|
|
+ * compiler optimizes out the check and assumes no overflow. */
|
|
/* Validated space in result. */
|
|
if (a->used > r->size) {
|
|
err = MP_VAL;
|
|
@@ -4841,6 +4845,7 @@ int sp_copy(const sp_int* a, sp_int* r)
|
|
r->sign = a->sign;
|
|
#endif
|
|
}
|
|
+ PRAGMA_GCC_DIAG_POP
|
|
}
|
|
|
|
return err;
|