diff options
author | Kevin Newton <[email protected]> | 2024-04-16 21:15:12 -0400 |
---|---|---|
committer | git <[email protected]> | 2024-04-17 01:15:21 +0000 |
commit | f34409bf8782481deabec6c577abd66373134af9 (patch) | |
tree | 4e63c3eb9864d290103c5eb2f4ceeb7ec14ffa13 /prism/util/pm_integer.c | |
parent | d6debba817da921d8bc9a3fdb6b4bcbe3d7b0859 (diff) |
[ruby/prism] Fix up more clang-analyzer failures
https://github.com/ruby/prism/commit/f9a1abbc64
Diffstat (limited to 'prism/util/pm_integer.c')
-rw-r--r-- | prism/util/pm_integer.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/prism/util/pm_integer.c b/prism/util/pm_integer.c index 50210f0cb1..0739662e98 100644 --- a/prism/util/pm_integer.c +++ b/prism/util/pm_integer.c @@ -194,7 +194,11 @@ karatsuba_multiply(pm_integer_t *destination, pm_integer_t *left, pm_integer_t * size_t length = left_length + right_length; uint32_t *values = (uint32_t*) xcalloc(length, sizeof(uint32_t)); + + assert(z0.values != NULL); memcpy(values, z0.values, sizeof(uint32_t) * z0.length); + + assert(z2.values != NULL); memcpy(values + 2 * half, z2.values, sizeof(uint32_t) * z2.length); uint32_t carry = 0; |