Skip to content

Commit

Permalink
Added NC_RO_GRAPH_TIME_TAKEN_ARRAY_SIZE into getGraphOptionClass0
Browse files Browse the repository at this point in the history
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
milosgajdos committed Sep 1, 2018
1 parent d07079f commit b8f4876
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions api/src/mvnc_api.c
Expand Up @@ -1307,6 +1307,7 @@ static ncStatus_t getGraphOptionClass0(struct _graphPrivate_t *g,
option == NC_RO_GRAPH_INPUT_COUNT || option == NC_RO_GRAPH_INPUT_COUNT ||
option == NC_RO_GRAPH_OUTPUT_COUNT || option == NC_RO_GRAPH_OUTPUT_COUNT ||
option == NC_RO_GRAPH_OPTION_CLASS_LIMIT || option == NC_RO_GRAPH_OPTION_CLASS_LIMIT ||
option == NC_RO_GRAPH_TIME_TAKEN_ARRAY_SIZE ||
option == NC_RW_GRAPH_EXECUTORS_NUM) && *dataLength < sizeof(int)) { option == NC_RW_GRAPH_EXECUTORS_NUM) && *dataLength < sizeof(int)) {
mvLog(MVLOG_ERROR, mvLog(MVLOG_ERROR,
"data length of data (%d) is smaller that required (%d)!\n", "data length of data (%d) is smaller that required (%d)!\n",
Expand Down

0 comments on commit b8f4876

Please sign in to comment.