[PATCH] D9741: Reject multiplication by zero cases in MallocOverflowSecurityChecker

Gábor Horváth xazax.hun at gmail.com
Thu Jul 9 16:49:43 PDT 2015


xazax.hun added a comment.

Isn't there already a checker that warns when a malloc called with 0 as argument?
If there isn't the one that checks this should work like the division by zero checker, so it should use the constraint manager to determine whether the argument is 0 or not. 
In case the expression engine does not know that x*0=0, than you should patch that instead of a checker.


http://reviews.llvm.org/D9741







More information about the cfe-commits mailing list