Sign in
gnu
/
gcc.git
/
09a3da82125e07da504136841d577f103aa4ea13
/
.
/
gcc
/
testsuite
/
c-c++-common
/
analyzer
/
out-of-bounds-pr111266.c
blob: cee36630baa20c5aa9fb7a913de53120f2ea7814 [
file
] [
log
] [
blame
]
#include
<stdint.h>
void
*
malloc
(
__SIZE_TYPE__
);
void
free
(
void
*);
void
test_binop2
()
{
char
*
p
=
(
char
*)
malloc
(
4
);
int32_t
*
i
=
(
int32_t
*)
(
p
+
3
);
*
i
=
20042
;
/* { dg-warning "heap-based buffer overflow" } */
free
(
p
);
}