Commit cf0b880b authored by Tatsuhiro Tsujikawa's avatar Tatsuhiro Tsujikawa

Error if undefined SETTINGS ID is detected in nghttp2_iv_check

parent 39fe7a5c
...@@ -640,6 +640,8 @@ int nghttp2_iv_check(const nghttp2_settings_entry *iv, size_t niv) ...@@ -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) ...@@ -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));
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment