From ac796ab6c9b625cf717f9c369d65f13edf3fb421 Mon Sep 17 00:00:00 2001 From: Yusuke Nakamura Date: Sat, 22 Nov 2014 03:23:34 +0900 Subject: [PATCH] muxer: Fix out-of-bounds writing of brands array. --- cli/muxer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cli/muxer.c b/cli/muxer.c index 58f79b3..c26bce1 100644 --- a/cli/muxer.c +++ b/cli/muxer.c @@ -304,7 +304,7 @@ static int muxer_usage_error( void ) static int add_brand( option_t *opt, uint32_t brand ) { - if( opt->num_of_brands > MAX_NUM_OF_BRANDS ) + if( opt->num_of_brands >= MAX_NUM_OF_BRANDS ) return -1; /* Avoid duplication. */ for( uint32_t i = 0; i < opt->num_of_brands; i++ ) -- 2.11.4.GIT