File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -11,13 +11,13 @@ void use(void *ptr);
1111void test_direct_param_uaf () {
1212 int * p = (int * )malloc (sizeof (int ));
1313 free (p );
14- use (p ); // expected-warning{{Use of memory after it is freed }}
14+ use (p ); // expected-warning{{Use of memory after it is released }}
1515}
1616
1717void test_struct_field_uaf () {
1818 struct Obj * o = (struct Obj * )malloc (sizeof (struct Obj ));
1919 free (o );
20- use (& o -> field ); // expected-warning{{Use of memory after it is freed }}
20+ use (& o -> field ); // expected-warning{{Use of memory after it is released }}
2121}
2222
2323void test_no_warning_const_int () {
@@ -33,12 +33,12 @@ void test_nested_alloc() {
3333 struct Obj * o = (struct Obj * )malloc (sizeof (struct Obj ));
3434 use (o ); // no-warning
3535 free (o );
36- use (o ); // expected-warning{{Use of memory after it is freed }}
36+ use (o ); // expected-warning{{Use of memory after it is released }}
3737}
3838
3939void test_nested_field () {
4040 struct Obj * o = (struct Obj * )malloc (sizeof (struct Obj ));
4141 int * f = & o -> field ;
4242 free (o );
43- use (f ); // expected-warning{{Use of memory after it is freed }}
43+ use (f ); // expected-warning{{Use of memory after it is released }}
4444}
You can’t perform that action at this time.
0 commit comments