Fixed segv
authorWerner Koch <wk@gnupg.org>
Sat, 8 Apr 2006 01:23:23 +0000 (01:23 +0000)
committerWerner Koch <wk@gnupg.org>
Sat, 8 Apr 2006 01:23:23 +0000 (01:23 +0000)
g10/ChangeLog
g10/mainproc.c

index fbb20c4..b55b7e0 100644 (file)
@@ -1,3 +1,8 @@
+2006-04-08  Werner Koch  <wk@g10code.com>
+
+       * mainproc.c (list_node): Print ring trust value only if not empty
+       and --with-colons has been given.
+
 2006-04-05  Werner Koch  <wk@g10code.com>
 
        * getkey.c (user_id_not_found_utf8): New.
index 38f57b1..cb4432a 100644 (file)
@@ -937,10 +937,12 @@ list_node( CTX c, KBNODE node )
                    putchar('\n');
                    if( opt.fingerprint && !any )
                        print_fingerprint( pk, NULL, 0 );
-                   if( node->next
+                   if( opt.with_colons
+                        && node->next
                        && node->next->pkt->pkttype == PKT_RING_TRUST ) {
                        printf("rtv:2:%u:\n",
-                                node->next->pkt->pkt.ring_trust->trustval );
+                               node->next->pkt->pkt.ring_trust?
+                               node->next->pkt->pkt.ring_trust->trustval : 0);
                    }
                    any=1;
                }