summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAidan MacDonald <amachronic@protonmail.com>2021-11-28 14:38:09 +0000
committerAidan MacDonald <amachronic@protonmail.com>2021-11-28 15:46:06 +0000
commit1ad60c33441619f2f3e9111d762b73264db1d44c (patch)
treed0d03c1625d270d1cc35045d96c515b65497a097
parentc086a3386f844e9e62df8fde22d27459dd66d541 (diff)
downloadrockbox-1ad60c33441619f2f3e9111d762b73264db1d44c.tar.gz
rockbox-1ad60c33441619f2f3e9111d762b73264db1d44c.zip
x1000-installer: remove redundant overflow check
This overflow is impossible to trigger due to the simple relationship between binary and hexadecimal numbers. Change-Id: Ie8243129967abb935a77152a808765318052c979
-rw-r--r--lib/x1000-installer/src/xf_flashmap.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/x1000-installer/src/xf_flashmap.c b/lib/x1000-installer/src/xf_flashmap.c
index dc0a26a019..972bf320ad 100644
--- a/lib/x1000-installer/src/xf_flashmap.c
+++ b/lib/x1000-installer/src/xf_flashmap.c
@@ -136,10 +136,8 @@ int xf_map_parseline(const char* line, struct xf_map* map)
if(int_val > UINT32_MAX/16)
return XF_E_INT_OVERFLOW;
- int_val *= 16;
- if(int_val > UINT32_MAX - digit_val)
- return XF_E_INT_OVERFLOW;
+ int_val *= 16;
int_val |= digit_val;
}
}