diff options
| author | jvoisin | 2024-04-24 17:09:08 +0200 |
|---|---|---|
| committer | jvoisin | 2024-04-24 17:14:46 +0200 |
| commit | a817e1555a755224cacc1cbdeeaefb6a1de606f0 (patch) | |
| tree | bfe86af6c7e7af91859eb36ec2e02056263f8827 /tests/test_issue57.c | |
| parent | 265fa03fa0c467c9c41d803ebe2a538e758cba20 (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 'tests/test_issue57.c')
| -rw-r--r-- | tests/test_issue57.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/test_issue57.c b/tests/test_issue57.c new file mode 100644 index 0000000..ee9c38e --- /dev/null +++ b/tests/test_issue57.c | |||
| @@ -0,0 +1,11 @@ | |||
| 1 | #include "common.h" | ||
| 2 | |||
| 3 | #include <string.h> | ||
| 4 | |||
| 5 | int main(int argc, char** argv) { | ||
| 6 | char buffer[32]; | ||
| 7 | memcpy(buffer , buffer + 16, 16); | ||
| 8 | puts(buffer); | ||
| 9 | |||
| 10 | return ret; | ||
| 11 | } | ||
