X-Git-Url: https://git.sommitrealweird.co.uk/onak.git/blobdiff_plain/e02c731dfbb288c736f2cd09a9b6df0507c59ddd..6d98e0138f8ef5963d98448871b13e1cf2356c64:/keydb.c?ds=inline diff --git a/keydb.c b/keydb.c index 3ebb056..c5b07c6 100644 --- a/keydb.c +++ b/keydb.c @@ -32,7 +32,7 @@ char *keyid2uid(uint64_t keyid) { struct openpgp_publickey *publickey = NULL; struct openpgp_signedpacket_list *curuid = NULL; - static char buf[1024]; + char buf[1024]; buf[0]=0; if (fetch_key(keyid, &publickey, false) && publickey != NULL) { @@ -51,7 +51,7 @@ char *keyid2uid(uint64_t keyid) if (buf[0] == 0) { return NULL; } else { - return buf; + return strdup(buf); } } #endif @@ -95,7 +95,7 @@ uint64_t getfullkeyid(uint64_t keyid) { struct openpgp_publickey *publickey = NULL; - if (keyid < 0x100000000) { + if (keyid < 0x100000000LL) { fetch_key(keyid, &publickey, false); keyid = get_keyid(publickey); free_publickey(publickey);