summaryrefslogtreecommitdiff
path: root/include/fortify-headers.h
diff options
context:
space:
mode:
authorjvoisin2024-04-24 17:09:08 +0200
committerjvoisin2024-04-24 17:14:46 +0200
commita817e1555a755224cacc1cbdeeaefb6a1de606f0 (patch)
treebfe86af6c7e7af91859eb36ec2e02056263f8827 /include/fortify-headers.h
parent265fa03fa0c467c9c41d803ebe2a538e758cba20 (diff)
Fix some overlap mismatch
This was caught by the following test: ``` int main(void) { char c[32]; memcpy(c, c + 16, 16); } ``` Reported-by: q66
Diffstat (limited to 'include/fortify-headers.h')
-rw-r--r--include/fortify-headers.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/fortify-headers.h b/include/fortify-headers.h
index ea2e430..796fd2d 100644
--- a/include/fortify-headers.h
+++ b/include/fortify-headers.h
@@ -141,8 +141,8 @@
141 * since gcc seems to like to generate code that relies on dst == src */ 141 * since gcc seems to like to generate code that relies on dst == src */
142#define __fh_overlap(a, len_a, b, len_b) \ 142#define __fh_overlap(a, len_a, b, len_b) \
143 ( \ 143 ( \
144 ((a) < (b) && (b) < (a) + (__fh_size_t)(len_a)) \ 144 ((a) < (b) && (b) < ((a) + (__fh_size_t)(len_a))) \
145 || ((b) < (a) && (a) < (b) + (__fh_size_t)(len_b)) \ 145 || ((b) < (a) && (a) < ((b) + (__fh_size_t)(len_b))) \
146 ) 146 )
147 147
148/* 148/*