git://git.onelab.eu
/
sliver-openvswitch.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
48c60af
)
ofp-parse: Fix invalid memory use.
author
Ethan Jackson
<ethan@nicira.com>
Tue, 28 Jun 2011 20:22:18 +0000
(13:22 -0700)
committer
Ben Pfaff
<blp@nicira.com>
Thu, 28 Jul 2011 18:21:58 +0000
(11:21 -0700)
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.
lib/ofp-parse.c
patch
|
blob
|
history
diff --git
a/lib/ofp-parse.c
b/lib/ofp-parse.c
index
a3492cb
..
e58ae27
100644
(file)
--- a/
lib/ofp-parse.c
+++ b/
lib/ofp-parse.c
@@
-440,6
+440,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;