]> git.sommitrealweird.co.uk Git - onak.git/blobdiff - keydb.c
cscvs to tla changeset 32
[onak.git] / keydb.c
diff --git a/keydb.c b/keydb.c
index 3ebb0560bf72ab8cb8ecbdfa5a6221c27cceb65e..c5b07c628dfd2040d3152311dc85bec31ce729ad 100644 (file)
--- 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);