diff --git a/tools/pvxvct.cpp b/tools/pvxvct.cpp index cf92d91..99e4b67 100644 --- a/tools/pvxvct.cpp +++ b/tools/pvxvct.cpp @@ -64,7 +64,7 @@ parsePeer(const char *optarg) // only # of bits. eg. "/24" std::istringstream strm(match[2].str()); unsigned nbit=0; - if((strm>>nbit).good()) { + if(!(strm>>nbit).good() || nbit>32) { throw std::runtime_error(pva::SB()<<"Expected number of bits. not "<