[libblockdev 0/3] bd_utils_size_human_readable patches (v2)

mulhern amulhern at redhat.com
Wed Sep 3 15:41:30 UTC 2014


Patches are all either new or different from previous versions.

I took a look at this code because of the Coverity error report about it:
Error: OVERRUN (CWE-119):
src/utils/sizes.c:40: cond_const: Checking "i < 7" implies that "i" has the value 7 on the false branch.
src/utils/sizes.c:51: overrun-local: Overrunning array "size_prefixes" of 7 8-byte elements at element index 7 (byte offset 56) using index "i" (which evaluates to 7).

mulhern (3):
  Omit always true condition and document some invariants.
  Add a test for the maximum representable size.
  Omit cast based distinction and print all as floats

 src/utils/sizes.c      | 19 ++++++++++++++-----
 src/utils/test_sizes.c |  4 ++++
 2 files changed, 18 insertions(+), 5 deletions(-)

-- 
1.9.3



More information about the anaconda-patches mailing list