[Fuzzing] bug fix 59062 and increasing converge

Signed-off-by: Arjun Singh <ajsinghyadav00@gmail.com>
This commit is contained in:
Arjun Singh 2023-05-24 00:14:30 +05:30 committed by Sukchan Lee
parent 928a80ef26
commit 81a261c200
1 changed files with 4 additions and 6 deletions

View File

@ -27,7 +27,7 @@
#define kMaxInputLength 1024
extern int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size)
{ /* open5gs/tests/unit/gtp-message-test.c */
{ /* open5gs/tests/non3gpp/gtp-path.c */
if (Size < kMinInputLength || Size > kMaxInputLength) {
return 1;
@ -39,18 +39,16 @@ extern int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size)
ogs_log_install_domain(&__ogs_tlv_domain, "tlv", OGS_LOG_NONE);
}
int result;
ogs_pkbuf_t *pkbuf;
ogs_gtp2_create_session_request_t req;
pkbuf = ogs_pkbuf_alloc(NULL, OGS_MAX_SDU_LEN);
if (pkbuf == NULL) {
return 1;
}
ogs_pkbuf_put_data(pkbuf, Data, Size);
ogs_tlv_parse_msg(&req, &ogs_gtp2_tlv_desc_create_session_request, pkbuf, OGS_TLV_MODE_T1_L2_I1);
ogs_gtp2_message_t gtp_message;
ogs_gtp2_parse_msg(&gtp_message, pkbuf);
ogs_pkbuf_free(pkbuf);