Skip to content
  1. Apr 17, 2018
  2. Apr 16, 2018
  3. Apr 15, 2018
  4. Apr 14, 2018
  5. Apr 13, 2018
  6. Apr 12, 2018
  7. Apr 11, 2018
  8. Apr 10, 2018
  9. Apr 09, 2018
  10. Apr 08, 2018
    • Dr. Matthias St. Pierre's avatar
      Fix false positives of IS_*() macros for 8-bit ASCII characters · a9b7a06e
      Dr. Matthias St. Pierre authored
      
      
      Fixes #5778, #5840
      
      The various IS_*() macros did not work correctly for 8-bit ASCII
      characters with the high bit set, because the CVT(a) preprocessor
      macro and'ed the given ASCII value with 0x7F, effectively folding
      the high value range 128-255 over the low value range 0-127.
      As a consequence, some of the IS_*() erroneously returned TRUE.
      
      This commit fixes the issue by adding range checks instead of
      cutting off high order bits using a mask. In order avoid multiple
      evaluation of macro arguments, most of the implementation was moved
      from macros into a static function is_keytype().
      
      Thanks to Румен Петров for reporting and analyzing the UTF-8 parsing
      issue #5840.
      
      Reviewed-by: default avatarRich Salz <rsalz@openssl.org>
      (Merged from https://github.com/openssl/openssl/pull/5903)
      a9b7a06e