Home GnuPG
Diffusion GnuPG c59b410cf1d5

gpg: Remove useless condition.
c59b410cf1d5Unpublished

Unpublished Commit · Learn More

Not On Permanent Ref: This commit is not an ancestor of any permanent ref.

Description

gpg: Remove useless condition.

* g10/keylist.c (list_keyblock_colon): Remove useless condition (PK).
(list_keyblock_print):  Likewise.

PK is already derefed above and thus testing for PK is dead code.
Detected by Stack 0.3:

bug: anti-simplify
model: |
  %tobool200 = icmp ne %struct.PKT_public_key* %3, null, !dbg !1498
  -->  true
stack:
  - /home/wk/s/gnupg/g10/keylist.c:1367:0
ncore: 1
core:
  - /home/wk/s/gnupg/g10/keylist.c:1319:0
    - null pointer dereference

bug: anti-simplify
model: |
  %tobool102 = icmp ne %struct.PKT_public_key* %4, null, !dbg !1462
  -->  true
stack:
  - /home/wk/s/gnupg/g10/keylist.c:978:0
ncore: 1
core:
  - /home/wk/s/gnupg/g10/keylist.c:955:0
    - null pointer dereference

bug: anti-simplify
model: |
  %tobool128 = icmp ne %struct.PKT_public_key* %4, null, !dbg !1469
  -->  true
stack:
  - /home/wk/s/gnupg/g10/keylist.c:990:0
ncore: 1
core:
  - /home/wk/s/gnupg/g10/keylist.c:955:0
    - null pointer dereference

Details

Provenance
wernerAuthored on Mar 15 2015, 12:30 PM
Parents
rGef0a3abf7305: scd: Fix possible NULL deref in apdu.c
Branches
Unknown
Tags
Unknown

Event Timeline

Werner Koch <wk@gnupg.org> committed rGc59b410cf1d5: gpg: Remove useless condition. (authored by Werner Koch <wk@gnupg.org>).Mar 15 2015, 12:39 PM