summaryrefslogtreecommitdiffstats
path: root/.clang-format
diff options
context:
space:
mode:
authorGravatar Anton Lundin <glance@acc.umu.se>2014-12-12 08:59:12 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-12-12 07:04:26 -0800
commitbf20c251ab2caf37bc3973bbb77201cb0ae7a588 (patch)
tree74b03413a08021a2d0a9f0fe6c12d05a61367f06 /.clang-format
parent46bd71a18427b5cc650b26b4d77d9a1260b79941 (diff)
downloadsubsurface-bf20c251ab2caf37bc3973bbb77201cb0ae7a588.tar.gz
Don't rely on malloc to return NULL for zero size
We rely on samples being NULL if a dc have no samples. Its completely legal for malloc to return a valid pointer to nowhere for zero sized malloc, which you can't follow and read what its pointing at. Its only viable to call free() on. In other code, if samples is a valid pointer, we dereference it and look at the first sample. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to '.clang-format')
0 files changed, 0 insertions, 0 deletions