Skip to content

Commit

Permalink
Fixed the security check algorithm
Browse files Browse the repository at this point in the history
Device ID is now defined as a Hex string.
  • Loading branch information
CoNsTaRs authored Mar 29, 2018
1 parent 5971169 commit 9212b5a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dvcid.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ namespace {
{ return false; }
for (const auto& c : str)
{
if (c < '0' || c > '9')
if (c < '0' || (c > '9' && c < 'a') || c > 'f')
{ return false; }
}
return true;
Expand All @@ -215,7 +215,7 @@ namespace {
{
if (
(*it > '9' && *it < 'A') ||
(*it < '0' || static_cast<int>(*it) > 'Z')
(*it < '0' || static_cast<int>(*it) > 'F')
)
{ return false; }
}
Expand Down

0 comments on commit 9212b5a

Please sign in to comment.