diff --git a/src/common/normMessage.cpp b/src/common/normMessage.cpp index 48352a3..4a01e09 100755 --- a/src/common/normMessage.cpp +++ b/src/common/normMessage.cpp @@ -79,7 +79,7 @@ bool NormMsg::InitFromBuffer(UINT16 msgLength) PLOG(PL_FATAL, "NormMsg::InitFromBuffer() invalid message type!\n"); return false; } - if (msgLength < header_length) + if ((msgLength < header_length) || (header_length < header_length_base)) { PLOG(PL_FATAL, "NormMsg::InitFromBuffer() invalid message or header length\n"); return false; diff --git a/wscript b/wscript index 46965d1..2e21b07 100755 --- a/wscript +++ b/wscript @@ -47,7 +47,7 @@ system = platform.system().lower() def options(ctx): ctx.recurse('protolib') - build_opts = ctx.parser.add_argument_group('Compile/install Options', 'Use during build/install step.') + build_opts = ctx.add_option_group('Compile/install Options', 'Use during build/install step.') # Add Rust binding options ctx.add_option('--build-rust', action='store_true', default=False,