[cocci] [RFC] Detecting missing null pointer checks after memory allocations
Markus Elfring <[email protected]>
| Newsgroups | fr.inria.cocci,org.kernel.vger.kernel-janitors,org.kernel.vger.linux-fsdevel,org.kernel.vger.linux-kernel,org.kernel.vger.linux-xfs |
|---|---|
| Message-ID | <[email protected]> |
Hello, I got into the mood to try another simple source code search out which can be achieved also by the means of the semantic patch language. @display@ expression size, source, target; @@ target = ( *kmalloc | *vmalloc | *malloc )(...); memcpy(target, source, size); It can be determined then from the generated diff file that mentioned implementation details can be found at 11 places (4 source files) of the software “Linux next-20251031”. Will such analysis information trigger further collateral evolution? Regards, Markus