svn commit: r269873 - head/lib/libc/nameser

Pedro Giffuni pfg at freebsd.org
Tue Aug 12 20:29:26 UTC 2014


Il giorno 12/ago/2014, alle ore 08:09, Hajimu UMEMOTO <ume at FreeBSD.org> ha scritto:

> Author: ume
> Date: Tue Aug 12 13:09:32 2014
> New Revision: 269873
> URL: http://svnweb.freebsd.org/changeset/base/269873
> 
> Log:
>  Fix broken pointer overflow check ns_name_unpack()
> 
>  Many compilers may optimize away the overflow check `msg + l < msg',
>  where `msg' is a pointer and `l' is an integer, because pointer
>  overflow is undefined behavior in C.
> 
>  Use a safe precondition test `l >= eom - msg' instead.
> 
>  Reference:
>  https://android-review.googlesource.com/#/c/50570/
> 
>  Requested by:	pfg
>  Obtained from:	NetBSD (CVS rev. 1.10)
> 

Thanks!

Pedro.


More information about the svn-src-all mailing list