diff options
author | Ethan Jackson <ethan@nicira.com> | 2011-06-28 13:22:18 -0700 |
---|---|---|
committer | Ethan Jackson <ethan@nicira.com> | 2011-06-28 14:07:25 -0700 |
commit | fb05ba4618dc5d6ae70da21a63c2ae6a4a1b5176 (patch) | |
tree | 2fea6fcbae9c33b492ee029c439356ec97856b83 | |
parent | 1101a0b4708d87505d80c4641c4adadd5c6ece36 (diff) |
ofp-parse: Fix invalid memory use.
In some cases, parsing of the note action could cause a realloc
which would result in the use of memory which was no longer
allocated.
-rw-r--r-- | lib/ofp-parse.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/ofp-parse.c b/lib/ofp-parse.c index 7742c821..5bc04845 100644 --- a/lib/ofp-parse.c +++ b/lib/ofp-parse.c @@ -486,6 +486,7 @@ str_to_action(char *str, struct ofpbuf *b) if (remainder) { ofpbuf_put_zeros(b, OFP_ACTION_ALIGN - remainder); } + nan = (struct nx_action_note *)((char *)b->data + start_ofs); nan->len = htons(b->size - start_ofs); } else if (!strcasecmp(act, "move")) { struct nx_action_reg_move *move; |