[PATCH] D79330: [Analyzer][VLASizeChecker] Check for VLA size overflow.

Balázs Kéri via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon May 4 08:00:00 PDT 2020


balazske created this revision.
Herald added subscribers: cfe-commits, ASDenysPetrov, martong, Charusso, gamesh411, dkrupp, donat.nagy, Szelethus, mikhail.ramalho, a.sidorin, szepet, baloghadamsoftware, xazax.hun.
Herald added a reviewer: Szelethus.
Herald added a project: clang.

Variable-length array (VLA) should have a size that fits into
a size_t value. At least if the size is queried with sizeof,
but it is better (and more simple) to check it always.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D79330

Files:
  clang/lib/StaticAnalyzer/Checkers/VLASizeChecker.cpp
  clang/test/Analysis/vla.c

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D79330.261822.patch
Type: text/x-patch
Size: 9591 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200504/a7d0a47c/attachment.bin>


More information about the cfe-commits mailing list