summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--packet/bgp/bgp.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/packet/bgp/bgp.go b/packet/bgp/bgp.go
index 380cbbb2..21dc892d 100644
--- a/packet/bgp/bgp.go
+++ b/packet/bgp/bgp.go
@@ -3014,6 +3014,10 @@ func parseDecValuesCmd(myCmd string, validationFunc func(int) error) ([][2]int,
return nil, err
}
case DECLogicOpNameMap[DEC_LOGIC_OP_AND], DECLogicOpNameMap[DEC_LOGIC_OP_OR]:
+ if index == 0 {
+ err := fmt.Errorf("Logic operator appears a first character")
+ return nil, err
+ }
bit := DECLogicOpValueMap[myCmdChar]
decOperatorsAndValues = append(decOperatorsAndValues, operatorValue)
if myCmdChar == DECLogicOpNameMap[DEC_LOGIC_OP_AND] {