]> the.earth.li Git - onak.git/blobdiff - keyid.c
Be more robust when handling unexpected lack of data
[onak.git] / keyid.c
diff --git a/keyid.c b/keyid.c
index 5db10f6d9c03b1aa10dc652e63cc2d1ef5cc8c70..a68513af81e822cdc74f94d5346a080104b367cb 100644 (file)
--- a/keyid.c
+++ b/keyid.c
@@ -145,7 +145,7 @@ onak_status_t get_packetid(struct openpgp_packet *packet, uint64_t *keyid)
        uint8_t         data;
 #endif
 
-       if (packet == NULL)
+       if (packet == NULL || packet->data == NULL)
                return ONAK_E_INVALID_PARAM;
 
        switch (packet->data[0]) {