SEGFAULT;(

Jan-Benedict Glaw jbglaw at lug-owl.de
Mon Jan 31 00:45:34 CET 2000


Hi!

Found a little bug in g10/keyedit.c... Tested version is 1.0.1, but keyedit.c
has neither changed in 1.0.1a nor in 1.1.0 (okay, it has changed, but not
at the relevant part;).

1. Create key (choose default values)
2. --edit and "addkey" "Sign & Encrypt", expiry (0) (-> \inf)
3. "safe"
4. --edit, "key 2", "expire", "2w"
--> gpg segfaults. Here is a gdb trace:

-------------- >8 ==================================================
(gdb) set args --edit C8997CC1
(gdb) run
Starting program: /usr/local/bin/gpg --edit C8997CC1
Secret key is available.

gpg: NOTE: secret key C8997CC1 is NOT protected.
pub  1024D/C8997CC1  created: 2000-01-30 expires: never      trust: -/u
sub  1024g/84F76ED2  created: 2000-01-30 expires: never     
sub  1024G/9DB5A4EB  created: 2000-01-30 expires: never     
(1)  Testkey (DO NEVER EVER USE!!!)

Command> key 2
              
pub  1024D/C8997CC1  created: 2000-01-30 expires: never      trust: -/u
sub  1024g/84F76ED2  created: 2000-01-30 expires: never     
sub* 1024G/9DB5A4EB  created: 2000-01-30 expires: never     
(1)  Testkey (DO NEVER EVER USE!!!)

Command> expire
Changing expiration time for a secondary key.
Please specify how long the key should be valid.
         0 = key does not expire
      <n>  = key expires in n days
      <n>w = key expires in n weeks
      <n>m = key expires in n months
      <n>y = key expires in n years
Key is valid for? (0) 2w
Key expires at Mon Feb 14 00:36:45 2000 CET
Is this correct (y/n)? y
                        
Program received signal SIGSEGV, Segmentation fault.
0x8080543 in menu_expire (pub_keyblock=0x80cd860, sec_keyblock=0x80d0280) at keyedit.c:1490
1490                    if( (mainkey && main_pk->version < 4)

================== 8< ------------------------------------------

main_pk seems to be a pointer to nirwana so main_pk->version kills gpg...

MfG, JBG

-- 
Fehler eingestehen, Größe zeigen: Nehmt die Rechtschreibreform zurück!!!
keyID=0x8399E1BB fingerprint=250D 3BCF 7127 0D8C A444 A961 1DBD 5E75 8399 E1BB
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 248 bytes
Desc: not available
Url : /pipermail/attachments/20000131/464f2170/attachment.bin


More information about the Gnupg-devel mailing list