summaryrefslogtreecommitdiff
path: root/regparse.c
diff options
context:
space:
mode:
authorKevin Backhouse <kevinbackhouse@github.com>2022-07-12 19:48:10 +0100
committerGitHub <noreply@github.com>2022-07-12 11:48:10 -0700
commit8c1808151f4c1b44e8b0fe935c571f05b2641b8b (patch)
treeed7dc9e5aac6945cae8df53e3f3ec1df6e120319 /regparse.c
parent8309b1366c3307ab8d9cda5b61b91540cf6cc8aa (diff)
Fix some UBSAN false positives (#6115)
* Fix some UBSAN false positives. * ruby tool/update-deps --fix
Notes
Notes: Merged-By: jhawthorn <john@hawthorn.email>
Diffstat (limited to 'regparse.c')
-rw-r--r--regparse.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/regparse.c b/regparse.c
index 309749033d..4ebd5f1c46 100644
--- a/regparse.c
+++ b/regparse.c
@@ -37,6 +37,7 @@
#include "regparse.h"
#include <stdarg.h>
+#include "internal/sanitizers.h"
#define WARN_BUFSIZE 256
@@ -394,6 +395,8 @@ str_end_cmp(st_data_t xp, st_data_t yp)
return 0;
}
+NO_SANITIZE("unsigned-integer-overflow", static st_index_t str_end_hash(st_data_t xp));
+
static st_index_t
str_end_hash(st_data_t xp)
{