]> git.ipfire.org Git - thirdparty/tor.git/commit
Another clang analyzer complaint wrt HT_GENERATE
authorNick Mathewson <nickm@torproject.org>
Tue, 2 Sep 2014 16:48:34 +0000 (12:48 -0400)
committerNick Mathewson <nickm@torproject.org>
Tue, 2 Sep 2014 16:48:34 +0000 (12:48 -0400)
commit00ffccd9a6d9b7f484c2e421be33aea3975a2879
treec0e01dfadc0a10feb98bbb517715c384ccacab1c
parente3c143f5214b4a2d37dbb47940eaf2cc2e212f86
Another clang analyzer complaint wrt HT_GENERATE

We're calling mallocfn() and reallocfn() in the HT_GENERATE macro
with the result of a product.  But that makes any sane analyzer
worry about overflow.

This patch keeps HT_GENERATE having its old semantics, since we
aren't the only project using ht.h.  Instead, define a HT_GENERATE2
that takes a reallocarrayfn.
14 files changed:
src/common/container.c
src/common/sandbox.c
src/common/util_process.c
src/ext/ht.h
src/or/channel.c
src/or/circuitlist.c
src/or/circuitmux.c
src/or/dns.c
src/or/fp_pair.c
src/or/geoip.c
src/or/microdesc.c
src/or/nodelist.c
src/or/policies.c
src/or/rephist.c