Fix securitiy problem in protocol parser, upd.tests