diff options
author | Ben Pfaff <blp@ovn.org> | 2018-08-10 12:30:40 -0700 |
---|---|---|
committer | Ben Pfaff <blp@ovn.org> | 2018-08-17 17:39:12 -0700 |
commit | 7d9008e39ae227074e4dd86140373afbfc3b2655 (patch) | |
tree | a8e1a011060ea2523ec8d53bed135f26063ce6b2 | |
parent | 7574f6b8749afcb8ecdb77ef4d89b99668ba9d9c (diff) | |
download | openvswitch-7d9008e39ae227074e4dd86140373afbfc3b2655.tar.gz |
ofp-port: Fix null dereference parsing Intel custom statistics.
Reported-at: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9788
Fixes: 7333c3b1ce02 ("ofp-port: Fix buffer overread parsing Intel custom statistics.")
Signed-off-by: Ben Pfaff <blp@ovn.org>
-rw-r--r-- | lib/ofp-port.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/ofp-port.c b/lib/ofp-port.c index 1d864c3a3..d4730cad7 100644 --- a/lib/ofp-port.c +++ b/lib/ofp-port.c @@ -1616,7 +1616,7 @@ parse_intel_port_custom_property(struct ofpbuf *payload, /* Counter name. */ uint8_t *name_len = ofpbuf_try_pull(payload, sizeof *name_len); - char *name = ofpbuf_try_pull(payload, *name_len); + char *name = name_len ? ofpbuf_try_pull(payload, *name_len) : NULL; if (!name_len || !name) { return OFPERR_OFPBPC_BAD_LEN; } |