]> Savannah Git Hosting - gnulib.git/commit
xalloc-oversized: check for PTRDIFF_MAX too
authorPaul Eggert <eggert@cs.ucla.edu>
Thu, 15 Dec 2016 01:09:04 +0000 (17:09 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Thu, 15 Dec 2016 18:19:48 +0000 (10:19 -0800)
commitf3b846699de69b8e6a508396f7f778eb1e917a47
treea38752dd841e0ad79f4d1e7e702da0078128034e
parenteb73ecacc856e155576d396c20c74159a70f4ada
xalloc-oversized: check for PTRDIFF_MAX too

This avoids undefined behavior when subtracting pointers to
objects containing more than PTRDIFF_MAX bytes.
* lib/xalloc-oversized.h (__xalloc_oversized, xalloc_oversized):
Also return 1 if the result would exceed PTRDIFF_MAX>
* modules/xalloc-oversized (Depends-on):
Add stdint.
ChangeLog
lib/xalloc-oversized.h
modules/xalloc-oversized