Commit 0af1158e authored by Mark Karpilovskij's avatar Mark Karpilovskij

yparser: check correct name length when parsing options

parent 5d9a12f7
......@@ -638,7 +638,8 @@ int yp_option_to_bin(
YP_CHECK_PARAMS_BIN;
while (opts->name != NULL) {
if (strncasecmp((char *)in->position, opts->name, YP_LEN) == 0) {
if (YP_LEN == strlen(opts->name) &&
strncasecmp((char *)in->position, opts->name, YP_LEN) == 0) {
wire_ctx_write_u8(out, opts->id);
wire_ctx_skip(in, YP_LEN);
YP_CHECK_RET;
......
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