diff options
author | Zdenek Kabelac <zkabelac@redhat.com> | 2018-11-02 21:10:21 +0100 |
---|---|---|
committer | Zdenek Kabelac <zkabelac@redhat.com> | 2018-11-03 16:10:31 +0100 |
commit | c7789daec06110b7ed3663f1ba8cf91f40c8e572 (patch) | |
tree | eeaa5111a3970832efb76fe75eff3d35bbfe80c6 /base/data-struct | |
parent | bc1976011adb51951dc0280817b2c047ab22ac7c (diff) | |
download | lvm2-c7789daec06110b7ed3663f1ba8cf91f40c8e572.tar.gz |
cov: overflow before widen
Evaluate as 64bit arithmetic (instead of doing 32bit mults which can
in this case purely teoretically overflow).
Diffstat (limited to 'base/data-struct')
-rw-r--r-- | base/data-struct/radix-tree-adaptive.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/base/data-struct/radix-tree-adaptive.c b/base/data-struct/radix-tree-adaptive.c index f5a8606d3..f8f3322b0 100644 --- a/base/data-struct/radix-tree-adaptive.c +++ b/base/data-struct/radix-tree-adaptive.c @@ -623,7 +623,7 @@ static void _degrade_to_n48(struct node256 *n256, struct value *result) } // Removes an entry in an array by sliding the values above it down. -static void _erase_elt(void *array, unsigned obj_size, unsigned count, unsigned index) +static void _erase_elt(void *array, size_t obj_size, unsigned count, unsigned index) { if (index == (count - 1)) // The simple case |