Skip to content

Commit

Permalink
ofproto-dpif-upcall: Properly initialize 'recv_buf'.
Browse files Browse the repository at this point in the history
Due to a typo, the latest upcall refactoring caused dpif_recv() to be
called on an un-initialized chunk of memory.

Signed-off-by: Ethan Jackson <[email protected]>
Reported-by: Justin Pettit <[email protected]>
Acked-by: Justin Pettit <[email protected]>
  • Loading branch information
ejj committed Aug 14, 2014
1 parent 233b8b6 commit 7174c14
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ofproto/ofproto-dpif-upcall.c
Original file line number Diff line number Diff line change
Expand Up @@ -586,7 +586,7 @@ recv_upcalls(struct handler *handler)
struct flow flow;
int error;

ofpbuf_use_stub(&recv_buf[n_upcalls], recv_stubs[n_upcalls],
ofpbuf_use_stub(recv_buf, recv_stubs[n_upcalls],
sizeof recv_stubs[n_upcalls]);
if (dpif_recv(udpif->dpif, handler->handler_id, &dupcall, recv_buf)) {
ofpbuf_uninit(recv_buf);
Expand Down

0 comments on commit 7174c14

Please sign in to comment.