Pressing the safety switch initiates the rotation of motors

FIRMWARE: ARDUCOPTER 2.2(QUAD)…At first pressing the safety switch the motors get ready to arm, but when switch is pressed again to disable the motors instead the motors start to spin which is not safe at all obviously… i am guessing it is the issue of the latest firmware since when i was using an earlier firmware no such issue arrived. I am completely cluesless here…please help

Do you mean 4.2.2? There are some additional safety switch related parameters to consider:

Sorry for replying late…yes i meant 4.2.2, right now the params are: Safety_mask: 0, BRD_SAFETYENABLE : 1, BRD_SAFETYOPTION: 3…the same params that were used before…still stuck on the same problem