<html>
<head>
<base href="https://llvm.org/bugs/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW " title="NEW --- - False positive in checker: Use of memory after it is freed" href="https://urldefense.proofpoint.com/v2/url?u=https-3A__llvm.org_bugs_show-5Fbug.cgi-3Fid-3D23965&d=AwMBaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=pF93YEPyB-J_PERP4DUZOJDzFVX5ZQ57vQk33wu0vio&m=cS5s3EGBWnr-k8vgeD__Mi9En6AmxbiQYjEBxvQ8b2s&s=KnWs0fk0h8eZasJXYeBAEPhzolD7yKqmQOUh_uheDr8&e=">23965</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>False positive in checker: Use of memory after it is freed
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>unspecified
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>Windows NT
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>Static Analyzer
</td>
</tr>
<tr>
<th>Assignee</th>
<td>kremenek@apple.com
</td>
</tr>
<tr>
<th>Reporter</th>
<td>me@moshekaplan.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvmbugs@cs.uiuc.edu
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>Created <span class=""><a href="attachment.cgi?id=14522" name="attach_14522" title="Original source file (airserv-ng.c)">attachment 14522</a> <a href="attachment.cgi?id=14522&action=edit" title="Original source file (airserv-ng.c)">[details]</a></span>
Original source file (airserv-ng.c)
When analyzing airserv-ng.c, clang reports a use after free.
<a href="https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_aircrack-2Dng_aircrack-2Dng_blob_master_src_airserv-2Dng.c-23L140&d=AwMBaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=pF93YEPyB-J_PERP4DUZOJDzFVX5ZQ57vQk33wu0vio&m=cS5s3EGBWnr-k8vgeD__Mi9En6AmxbiQYjEBxvQ8b2s&s=JMvM-JZ7Hity4SvnA28ftpmRv6APNaW-SKtUofTr10E&e=">https://github.com/aircrack-ng/aircrack-ng/blob/master/src/airserv-ng.c#L140</a>
However, the memory is NULLed immediately after the call to free. Therefore, if
(c == NULL) is true and it breaks out of the loop.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>