Commit 27182f1b authored by Mark Karpilovskij's avatar Mark Karpilovskij Committed by Daniel Salzman

yparser: check correct name length when parsing options

parent 777b1264
......@@ -639,7 +639,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