diff options
author | Stephen Fisher <steve@stephen-fisher.com> | 2011-04-12 22:23:03 +0000 |
---|---|---|
committer | Stephen Fisher <steve@stephen-fisher.com> | 2011-04-12 22:23:03 +0000 |
commit | 4b416d92d0679ec449260cd6d3b7b1d608fb550f (patch) | |
tree | 7c83ba656414dbe73241641bf022760d5a5243bd /tools | |
parent | ce2eea5b95fcef8f91d510d2acb7ff2ff0e7721f (diff) |
Fix Coverity 524: NEGATIVE_RETURNS
Coverity sees that two calls to tvb_length_remaining() with an offset
of 0 may return -1 (for an "out of bounds" condition), which would lead
to an assignment of -1 to an unsigned variable and then passing it
to functions further down that cannot accept negative values.
Use tvb_ensure_length_remaining() to throw an exception in a case of
out of bounds access (though unlikely with an offset of 0) instead of
tvb_length_remaining(), which would return -1.
svn path=/trunk/; revision=36615
Diffstat (limited to 'tools')
0 files changed, 0 insertions, 0 deletions