Commit fbaea181 authored by aligungr's avatar aligungr

Allow IMSI smaller than 15

parent 61edbc6c
......@@ -19,7 +19,7 @@ Supi Supi::Parse(const std::string &supi)
if (supi[0] == 'i' && supi[1] == 'm' && supi[2] == 's' && supi[3] == 'i' && supi[4] == '-')
{
std::string val = supi.substr(5);
if (val.size() > 15)
if (val.size() < 4u || val.size() > 15u)
throw std::runtime_error("invalid IMSI value");
for (char c : val)
if (c < '0' || c > '9')
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment