From f86d97f5463bf3e1717f4b47b60216d6a3192699 Mon Sep 17 00:00:00 2001 From: Sourav Moitra Date: Wed, 1 Jan 2025 09:50:22 +0530 Subject: [PATCH] Try again Signed-off-by: Sourav Moitra --- src/ocispec/json_common.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ocispec/json_common.c b/src/ocispec/json_common.c index 8093b4eb..d6b65979 100644 --- a/src/ocispec/json_common.c +++ b/src/ocispec/json_common.c @@ -142,9 +142,9 @@ int json_double_to_uint64 (double d, uint64_t *converted) { // Safely convert double to uint64_t by checking for potential overflows - if (d >= 9223372036854775807.0) { // Check if value is greater than or equal to 2^32 + if (d >= 4294967296.0) { // Check if value is greater than or equal to 2^32 // TODO: Better solution for converting double to uint64 - char string[20]; + char string[24]; sprintf(string, "%0.f", d); *converted = strtoull(string, NULL, 10); } else {