summaryrefslogtreecommitdiff
path: root/include/fortify-headers.h
diff options
context:
space:
mode:
authorjvoisin2023-12-27 16:17:55 +0100
committerjvoisin2023-12-27 16:17:55 +0100
commit8513fddefca4c6e3982718732afeec71bad4e688 (patch)
tree46f1132082012f57628d0fad296c64fa22209c90 /include/fortify-headers.h
parent80a83a56b52e833e6d3afec4d0723d7625d52cee (diff)
Improve __fh_overlap implementation
Diffstat (limited to 'include/fortify-headers.h')
-rw-r--r--include/fortify-headers.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/fortify-headers.h b/include/fortify-headers.h
index 9831a33..d75ff43 100644
--- a/include/fortify-headers.h
+++ b/include/fortify-headers.h
@@ -135,10 +135,10 @@
135//TODO(jvoisin) Add a check for overflows 135//TODO(jvoisin) Add a check for overflows
136/* check if pointers are overlapping but not if dst == src, 136/* check if pointers are overlapping but not if dst == src,
137 * since gcc seems to like to generate code that relies on dst == src */ 137 * since gcc seems to like to generate code that relies on dst == src */
138#define __fh_overlap(a, b, l) \ 138#define __fh_overlap(a, len_a, b, len_b) \
139 ( \ 139 ( \
140 ((a) < (b) && (b) < (a) + (__fh_size_t)(l)) \ 140 ((a) < (b) && (b) < (a) + (__fh_size_t)(len_a)) \
141 || ((b) < (a) && (a) < (b) + (__fh_size_t)(l)) \ 141 || ((b) < (a) && (a) < (b) + (__fh_size_t)(len_b)) \
142 ) 142 )
143 143
144/* 144/*