g13: Fix pointer wrap check.
authorWerner Koch <wk@gnupg.org>
Sun, 15 Mar 2015 12:33:26 +0000 (13:33 +0100)
committerWerner Koch <wk@gnupg.org>
Sun, 15 Mar 2015 12:33:26 +0000 (13:33 +0100)
commit4bc3a2e954afc2ba7dbe79ba5f740184b7d4cd73
tree90702833928610b649c9f23887743edada6e4f4f
parent3a35c9740ab792068ec4b3732ecfaa17bf4fc7f0
g13: Fix pointer wrap check.

* g13/utils.c (find_tuple, next_tuple): Cast pointer to size_t before
doing an overflow check.
--

Detected by Stack 0.3:

    bug: anti-simplify
  model: |
    %cmp4 = icmp ult i8* %add.ptr3, %s.0, !dbg !568
    -->  false
  stack:
    - /home/wk/s/gnupg/g13/utils.c:127:0
  ncore: 1
  core:
    - /home/wk/s/gnupg/g13/utils.c:127:0
      - pointer overflow
g13/utils.c