[Heimdal-source-changes] [heimdal/heimdal] a5da5b: asn1: check overflow against SIZE_MAX not +1

GitHub noreply at github.com
Sat Juni 21 02:19:41 CEST 2014


  Branch: refs/heads/master
  Home:   https://github.com/heimdal/heimdal
  Commit: a5da5bcb96df0adc2e8bf2af5611db40b1f4845e
      https://github.com/heimdal/heimdal/commit/a5da5bcb96df0adc2e8bf2af5611db40b1f4845e
  Author: Jeffrey Altman <jaltman at secure-endpoints.com>
  Date:   2014-06-20 (Fri, 20 Jun 2014)

  Changed paths:
    M lib/asn1/der_get.c

  Log Message:
  -----------
  asn1: check overflow against SIZE_MAX not +1

A comparison of (len > len + 1) is permitted to be optimized out
as dead code because it can't be true.  Overflowing is an exceptional
condition that results in undefined behavior.  The correct conditional
is (len == SIZE_MAX) when len is size_t.

Change-Id: Ia5586556a973d9fa5228430c4304ea9792c996bb




More information about the Heimdal-source-changes mailing list