Skip to content
  1. Apr 24, 2017
  2. Apr 23, 2017
  3. Apr 22, 2017
  4. Apr 21, 2017
  5. Apr 20, 2017
  6. Apr 19, 2017
  7. Apr 18, 2017
  8. Apr 17, 2017
    • Andy Polyakov's avatar
      asn1/a_int.c: clean up asn1_get_int64. · 786b6a45
      Andy Polyakov authored
      
      
      Trouble was that integer negation wasn't producing *formally* correct
      result in platform-neutral sense. Formally correct thing to do is
      -(int64_t)u, but this triggers undefined behaviour for one value that
      would still be representable in ASN.1. The trigger was masked with
      (int64_t)(0-u), but this is formally inappropriate for values other
      than the problematic one. [Also reorder branches to favour most-likely
      paths and harmonize asn1_string_set_int64 with asn1_get_int64].]
      
      Reviewed-by: default avatarRich Salz <rsalz@openssl.org>
      (Merged from https://github.com/openssl/openssl/pull/3231)
      786b6a45