[ovs-dev] [PATCH] ofproto-dpif-upcall: Properly initialize 'recv_buf'.

Ethan Jackson ethan at nicira.com
Thu Aug 14 22:49:55 UTC 2014


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 <ethan at nicira.com>
Reported-by: Justin Pettit <jpettit at nicira.com>
---
 ofproto/ofproto-dpif-upcall.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ofproto/ofproto-dpif-upcall.c b/ofproto/ofproto-dpif-upcall.c
index 3b4ff5f..180684c 100644
--- a/ofproto/ofproto-dpif-upcall.c
+++ b/ofproto/ofproto-dpif-upcall.c
@@ -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);
-- 
1.8.1.2




More information about the dev mailing list