Home GnuPG
Diffusion GnuPG 1a9f13bc663d

gpg: Fix possible dead code elimination.
1a9f13bc663dUnpublished

Unpublished Commit · Learn More

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

Description

gpg: Fix possible dead code elimination.

* g10/encrypt.c: Change condition for detecting a real file.

Detected by Stack 3.0:

bug: anti-dce
model: |
  %tobool155 = icmp ne i32 %call154, 0, !dbg !1298
  -->  true
  ************************************************************
  land.lhs.true156:
  %96 = icmp eq i8* %filename, null
  call void @opt.bugon(i1 %96), !dbg !1298, !bug !1250
  %97 = load i8* %filename, align 1, !dbg !1298
  %conv157 = sext i8 %97 to i32, !dbg !1298
  %tobool158 = icmp ne i32 %conv157, 0, !dbg !1298
  br i1 %tobool158, label %land.lhs.true159, label %if.else177,\
        !dbg !1298
stack:
  - /home/wk/s/gnupg/g10/encrypt.c:639:0
ncore: 1
core:
  - /home/wk/s/gnupg/g10/encrypt.c:639:0
    - null pointer dereference

Details

Provenance
wernerAuthored on Mar 15 2015, 2:01 PM
Parents
rG4bc3a2e954af: g13: Fix pointer wrap check.
Branches
Unknown
Tags
Unknown

Event Timeline

Werner Koch <wk@gnupg.org> committed rG1a9f13bc663d: gpg: Fix possible dead code elimination. (authored by Werner Koch <wk@gnupg.org>).Mar 15 2015, 2:01 PM