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:37:03 -0700 |
commit | 11f8e96601bc31353153a16fef53b447dc687599 (patch) | |
tree | 72b3ae512e223fb65fa66e3510f04e5020547a3e | |
parent | 20cdd1dbd5460ba6cb63f68a0dd033ebdc13f1f9 (diff) | |
download | openvswitch-11f8e96601bc31353153a16fef53b447dc687599.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 2c812f8ec..8d882a14b 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; } |