Permalink
Browse files

Added NC_RO_GRAPH_TIME_TAKEN_ARRAY_SIZE into getGraphOptionClass0

Intel forgot to add this option here which then results in segfaults as
the data buffer never gets re-allocated if invalid data length is
supplied
  • Loading branch information...
milosgajdos83 committed Sep 1, 2018
1 parent d07079f commit b8f4876d825b80b4e3a14764542fbabb82f68a4f
Showing with 1 addition and 0 deletions.
  1. +1 −0 api/src/mvnc_api.c
View
@@ -1307,6 +1307,7 @@ static ncStatus_t getGraphOptionClass0(struct _graphPrivate_t *g,
option == NC_RO_GRAPH_INPUT_COUNT ||
option == NC_RO_GRAPH_OUTPUT_COUNT ||
option == NC_RO_GRAPH_OPTION_CLASS_LIMIT ||
option == NC_RO_GRAPH_TIME_TAKEN_ARRAY_SIZE ||
option == NC_RW_GRAPH_EXECUTORS_NUM) && *dataLength < sizeof(int)) {
mvLog(MVLOG_ERROR,
"data length of data (%d) is smaller that required (%d)!\n",

0 comments on commit b8f4876

Please sign in to comment.