[SBI] fix crash when no mandatory item (#1350)

NRF crashed if NFService does not have a versions.
Versions are mandatory, we've modified the SBI interface for the safety.
This commit is contained in:
Sukchan Lee 2022-02-05 20:20:45 +09:00
parent acfcbda8fa
commit 900e888dc1
219 changed files with 2474 additions and 0 deletions

View file

@ -405,6 +405,12 @@ OpenAPI_dnn_configuration_t *OpenAPI_dnn_configuration_parseFromJSON(cJSON *dnn_
}
OpenAPI_ip_address_t *static_ip_addressItem = OpenAPI_ip_address_parseFromJSON(static_ip_address_local_nonprimitive);
if (!static_ip_addressItem) {
ogs_error("No static_ip_addressItem");
OpenAPI_list_free(static_ip_addressList);
goto end;
}
OpenAPI_list_add(static_ip_addressList, static_ip_addressItem);
}
}
@ -478,6 +484,12 @@ OpenAPI_dnn_configuration_t *OpenAPI_dnn_configuration_parseFromJSON(cJSON *dnn_
}
OpenAPI_frame_route_info_t *ipv4_frame_route_listItem = OpenAPI_frame_route_info_parseFromJSON(ipv4_frame_route_list_local_nonprimitive);
if (!ipv4_frame_route_listItem) {
ogs_error("No ipv4_frame_route_listItem");
OpenAPI_list_free(ipv4_frame_route_listList);
goto end;
}
OpenAPI_list_add(ipv4_frame_route_listList, ipv4_frame_route_listItem);
}
}
@ -501,6 +513,12 @@ OpenAPI_dnn_configuration_t *OpenAPI_dnn_configuration_parseFromJSON(cJSON *dnn_
}
OpenAPI_frame_route_info_t *ipv6_frame_route_listItem = OpenAPI_frame_route_info_parseFromJSON(ipv6_frame_route_list_local_nonprimitive);
if (!ipv6_frame_route_listItem) {
ogs_error("No ipv6_frame_route_listItem");
OpenAPI_list_free(ipv6_frame_route_listList);
goto end;
}
OpenAPI_list_add(ipv6_frame_route_listList, ipv6_frame_route_listItem);
}
}