ofp-parse: Don't segfault when an OpenFlow action's argument is missing.
authorBen Pfaff <blp@nicira.com>
Tue, 22 Feb 2011 22:55:39 +0000 (14:55 -0800)
committerBen Pfaff <blp@nicira.com>
Wed, 23 Feb 2011 17:42:25 +0000 (09:42 -0800)
commitc4894ed48f0c727a87fc64629623bd62aef1e95b
tree237c7c85af29dbea4b39e9f624305f8f09f05672
parent338bd6a0fe317e6a320aca67a1dc2d090ef77de9
ofp-parse: Don't segfault when an OpenFlow action's argument is missing.

Some actions checked that 'arg' was nonnull before attempting to parse it
but a lot of them didn't.  This commit avoids the segfault by substituting
an empty string when no argument is given.  It also updates a few of the
action implementations to correspond.

Reported-by: Reid Price <reid@nicira.com>
Bug #4462.
Coverity #10712.
lib/ofp-parse.c