]> the.earth.li Git - onak.git/commitdiff
Fix decoding of signature creation time
authorJonathan McDowell <noodles@earth.li>
Fri, 15 Sep 2023 18:27:49 +0000 (23:57 +0530)
committerJonathan McDowell <noodles@earth.li>
Sat, 16 Sep 2023 09:33:38 +0000 (15:03 +0530)
decodekey.c

index f8cc40771c63f85e845216b7b0c0a128e5e8fbda..6e15bade3a06a2b16caa31fd0ee17e0fa5042a21 100644 (file)
@@ -94,11 +94,11 @@ onak_status_t parse_subpackets(unsigned char *data, size_t len,
                        if (creation != NULL) {
                                *creation = data[offset + packetlen - 4];
                                *creation <<= 8;
-                               *creation = data[offset + packetlen - 3];
+                               *creation += data[offset + packetlen - 3];
                                *creation <<= 8;
-                               *creation = data[offset + packetlen - 2];
+                               *creation += data[offset + packetlen - 2];
                                *creation <<= 8;
-                               *creation = data[offset + packetlen - 1];
+                               *creation += data[offset + packetlen - 1];
                        }
                        break;
                        /*