Skip to content

Commit

Permalink
ofp-port: Fix null dereference parsing Intel custom statistics.
Browse files Browse the repository at this point in the history
Reported-at: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9788
Fixes: 7333c3b ("ofp-port: Fix buffer overread parsing Intel custom statistics.")
Signed-off-by: Ben Pfaff <blp@ovn.org>
  • Loading branch information
blp committed Aug 18, 2018
1 parent 7574f6b commit 7d9008e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/ofp-port.c
Expand Up @@ -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;
}
Expand Down

0 comments on commit 7d9008e

Please sign in to comment.