From f2b1132c339856064cabbe790b5eb2d71ed409f5 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Thu, 25 Jun 2015 08:50:04 -0700 Subject: 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 --- load-git.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'load-git.c') 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"); -- cgit v1.2.3-70-g09d2