Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 14 Apr 2017 08:32:34 -0700
From:      Conrad Meyer <cem@freebsd.org>
To:        "Andrey V. Elsukov" <ae@freebsd.org>
Cc:        src-committers <src-committers@freebsd.org>, svn-src-all@freebsd.org,  svn-src-head@freebsd.org
Subject:   Re: svn commit: r316826 - head/sys/netpfil/ipfw/nat64
Message-ID:  <CAG6CVpVJ%2BJ_dy%2BNV=SFXSN6O7OOBQOAW6gZvRBJDsQNxNyHy2A@mail.gmail.com>
In-Reply-To: <201704141158.v3EBwfLm003147@repo.freebsd.org>
References:  <201704141158.v3EBwfLm003147@repo.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Apr 14, 2017 at 4:58 AM, Andrey V. Elsukov <ae@freebsd.org> wrote:
> Author: ae
> Date: Fri Apr 14 11:58:41 2017
> New Revision: 316826
> URL: https://svnweb.freebsd.org/changeset/base/316826
>
> Log:
>   Avoid undefined behavior.
>
>   The 'pktid' variable is modified while being used twice between
>   sequence points, probably due to htonl() is macro.

FYI =E2=80=94 there are a ton of similar reports in sys/rpc due to the XDR
macros (which read a network value off a pointer and increment it).
See e.g., IXDR_GET_UINT32() macro.

Best,
Conrad



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAG6CVpVJ%2BJ_dy%2BNV=SFXSN6O7OOBQOAW6gZvRBJDsQNxNyHy2A>