From: Jonathan McDowell Date: Tue, 30 Sep 2014 21:34:21 +0000 (+0100) Subject: Use strtouq to parse keyid instead of strtoul X-Git-Tag: onak-0.4.4~1 X-Git-Url: http://the.earth.li/gitweb/?p=onak.git;a=commitdiff_plain;h=3648a31750b3b42197c404483a18ca63d5f8777b 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". --- 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) {