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

GitHub noreply at github.com
Sat Juni 21 02:20:58 CEST 2014


  Branch: refs/heads/heimdal-1-6-branch
  Home:   https://github.com/heimdal/heimdal
  Commit: a5adc061079ddab92b9520e9c55f1c157c354f38
      https://github.com/heimdal/heimdal/commit/a5adc061079ddab92b9520e9c55f1c157c354f38
  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
(cherry picked from commit a5da5bcb96df0adc2e8bf2af5611db40b1f4845e)




More information about the Heimdal-source-changes mailing list