Error if undefined SETTINGS ID is detected in nghttp2_iv_check
This commit is contained in:
parent
39fe7a5cfa
commit
cf0b880b15
|
@ -640,6 +640,8 @@ int nghttp2_iv_check(const nghttp2_settings_entry *iv, size_t niv)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return 1;
|
return 1;
|
||||||
|
|
|
@ -434,4 +434,9 @@ void test_nghttp2_iv_check(void)
|
||||||
CU_ASSERT(nghttp2_iv_check(iv, 2));
|
CU_ASSERT(nghttp2_iv_check(iv, 2));
|
||||||
iv[1].value = 3;
|
iv[1].value = 3;
|
||||||
CU_ASSERT(!nghttp2_iv_check(iv, 2));
|
CU_ASSERT(!nghttp2_iv_check(iv, 2));
|
||||||
|
|
||||||
|
/* Undefined SETTINGS ID */
|
||||||
|
iv[1].settings_id = 1000000009;
|
||||||
|
iv[1].value = 0;
|
||||||
|
CU_ASSERT(!nghttp2_iv_check(iv, 2));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue