From 3648a31750b3b42197c404483a18ca63d5f8777b Mon Sep 17 00:00:00 2001 From: Jonathan McDowell Date: Tue, 30 Sep 2014 22:34:21 +0100 Subject: [PATCH] Use strtouq to parse keyid instead of strtoul The use of strtoul to parse the key ID breaks parsing 64 bit key IDs on 32 bit platforms. Use strtouq instead, which is defined as returning a 64 bit rather than being dependant on the length of "unsigned long". --- onak.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/onak.c b/onak.c index ad86cb0..0c4673d 100644 --- a/onak.c +++ b/onak.c @@ -330,7 +330,7 @@ int main(int argc, char *argv[]) } isfp = true; } else if (search != NULL) { - keyid = strtoul(search, &end, 16); + keyid = strtouq(search, &end, 16); if (*search != 0 && end != NULL && *end == 0) { -- 2.39.2