View Issue Details

IDProjectCategoryView StatusLast Update
0000381fileGeneralpublic2022-09-27 19:05
Reportervt Assigned Tochristos  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product Version5.43 
Fixed in VersionHEAD 
Summary0000381: test.c:61:22: warning: use after 'free' of 's_17' [CWE-416] [-Wanalyzer-use-after-free]
DescriptionGCC-12 static analyzer seems correctly report:
```
test.c: In function 'slurp':
test.c:61:22: warning: use after 'free' of 's_17' [CWE-416] [-Wanalyzer-use-after-free]
   61 | *s++ = c;
      | ^

test.c:67:14: warning: use after 'free' of 's_18' [CWE-416] [-Wanalyzer-use-after-free]
   67 | *s++ = '\0';
      | ^

```
Even thought this is just a test.

ps. Also additional warning:
```
file.c: In function 'unwrap':
file.c:550:25: warning: leak of 'flist_41' [CWE-401] [-Wanalyzer-malloc-leak]
  550 | return 1;
      | ^
```
Steps To ReproduceCFLAGS=-fanalyzer
TagsNo tags attached.

Activities

christos

2022-09-27 19:05

manager   ~0003818

Fixed, thanks!

Issue History

Date Modified Username Field Change
2022-09-15 00:33 vt New Issue
2022-09-27 19:05 christos Assigned To => christos
2022-09-27 19:05 christos Status new => assigned
2022-09-27 19:05 christos Status assigned => resolved
2022-09-27 19:05 christos Resolution open => fixed
2022-09-27 19:05 christos Fixed in Version => HEAD
2022-09-27 19:05 christos Note Added: 0003818