ofp-actions: Fix use-after-free in bundle action.
[cascardo/ovs.git] / lib / ofp-actions.c
index ae961f6..fe1424f 100644 (file)
@@ -1253,9 +1253,9 @@ decode_bundle(bool load, const struct nx_action_bundle *nab,
     for (i = 0; i < bundle->n_slaves; i++) {
         uint16_t ofp_port = ntohs(((ovs_be16 *)(nab + 1))[i]);
         ofpbuf_put(ofpacts, &ofp_port, sizeof ofp_port);
+        bundle = ofpacts->header;
     }
 
-    bundle = ofpacts->header;
     ofpact_finish(ofpacts, &bundle->ofpact);
 
     if (!error) {