diff --git a/src/elf2kip.c b/src/elf2kip.c
index 397a228..4836433 100644
--- a/src/elf2kip.c
+++ b/src/elf2kip.c
@@ -131,7 +131,7 @@ int cJSON_GetU64(const cJSON *obj, const char *field, u64 *out) {
     const cJSON *config = cJSON_GetObjectItemCaseSensitive(obj, field);
     if (cJSON_IsString(config) && (config->valuestring != NULL)) {
         char *endptr = NULL;
-        *out = strtoul(config->valuestring, &endptr, 16);
+        *out = strtoull(config->valuestring, &endptr, 16);
         if (config->valuestring == endptr) {
             fprintf(stderr, "Failed to get %s (empty string)\n", field);
             return 0;
@@ -156,7 +156,7 @@ int cJSON_GetU64(const cJSON *obj, const char *field, u64 *out) {
 int cJSON_GetU64FromObjectValue(const cJSON *config, u64 *out) {
     if (cJSON_IsString(config) && (config->valuestring != NULL)) {
         char *endptr = NULL;
-        *out = strtoul(config->valuestring, &endptr, 16);
+        *out = strtoull(config->valuestring, &endptr, 16);
         if (config->valuestring == endptr) {
             fprintf(stderr, "Failed to get %s (empty string)\n", config->string);
             return 0;
diff --git a/src/npdmtool.c b/src/npdmtool.c
index 009fb4a..9b2061f 100644
--- a/src/npdmtool.c
+++ b/src/npdmtool.c
@@ -184,7 +184,7 @@ int cJSON_GetU64(const cJSON *obj, const char *field, u64 *out) {
     const cJSON *config = cJSON_GetObjectItemCaseSensitive(obj, field);
     if (cJSON_IsString(config) && (config->valuestring != NULL)) {
         char *endptr = NULL;
-        *out = strtoul(config->valuestring, &endptr, 16);
+        *out = strtoull(config->valuestring, &endptr, 16);
         if (config->valuestring == endptr) {
             fprintf(stderr, "Failed to get %s (empty string)\n", field);
             return 0;
@@ -209,7 +209,7 @@ int cJSON_GetU64(const cJSON *obj, const char *field, u64 *out) {
 int cJSON_GetU64FromObjectValue(const cJSON *config, u64 *out) {
     if (cJSON_IsString(config) && (config->valuestring != NULL)) {
         char *endptr = NULL;
-        *out = strtoul(config->valuestring, &endptr, 16);
+        *out = strtoull(config->valuestring, &endptr, 16);
         if (config->valuestring == endptr) {
             fprintf(stderr, "Failed to get %s (empty string)\n", config->string);
             return 0;