[hwasan] Fix malloc overflow detection.
Check size limit before rounding up, otherwise malloc((size_t)-1) would happily allocate 0 bytes. Steal a nice test case from scudo. llvm-svn: 341612
Loading
Please register or sign in to comment
Check size limit before rounding up, otherwise malloc((size_t)-1) would happily allocate 0 bytes. Steal a nice test case from scudo. llvm-svn: 341612