packets: Fix potential use-after-free in compose_benign_packet().
authorBen Pfaff <blp@nicira.com>
Thu, 24 Mar 2011 20:35:15 +0000 (13:35 -0700)
committerBen Pfaff <blp@nicira.com>
Fri, 1 Apr 2011 22:52:19 +0000 (15:52 -0700)
commit2c5f293cc88e5b003b7c2d7c6f2e941789af8fd1
tree1782e3b5b52ddc0adc8a4a521a270c303f5e3392
parent5de1bb5cc9eb5b52c095a02d8afe68bc34ae0523
packets: Fix potential use-after-free in compose_benign_packet().

The second call to ofpbuf_put_zeros() could cause the 'eth' pointer to
be invalidated.

It appears that this does not fix a real bug because the existing callers
all preallocate 128 bytes of tailroom, but the interface doesn't document
that requirement.
lib/packets.c