diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2015-06-25 08:50:04 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2015-06-25 08:50:04 -0700 |
commit | f2b1132c339856064cabbe790b5eb2d71ed409f5 (patch) | |
tree | 4bbca0678792ecd68fbf08730168450625cc52e3 | |
parent | 298f023e1f2767d0ac5f79de1bdbedf5198ba4a5 (diff) | |
download | subsurface-f2b1132c339856064cabbe790b5eb2d71ed409f5.tar.gz |
Use strtoul to parse unsigned values
Otherwise reading in the dive site uuids will break on 32bit machines (as
all values >= 0x80000000 will be truncated to LONG_MAX).
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r-- | load-git.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/load-git.c b/load-git.c index 932eb50a5..0610cd0d8 100644 --- a/load-git.c +++ b/load-git.c @@ -1427,7 +1427,7 @@ static int parse_site_entry(git_repository *repo, const git_tree_entry *entry, c if (*suffix == '\0') return report_error("Dive site without uuid"); struct dive_site *ds = alloc_dive_site(); - ds->uuid = strtol(suffix, NULL, 16); + ds->uuid = strtoul(suffix, NULL, 16); git_blob *blob = git_tree_entry_blob(repo, entry); if (!blob) return report_error("Unable to read dive site file"); |