From 9212b5a7802681c3c29b8a95148c4285d72cb9a9 Mon Sep 17 00:00:00 2001 From: CoNsTaRs Date: Wed, 28 Mar 2018 22:21:26 -0400 Subject: [PATCH] Fixed the security check algorithm Device ID is now defined as a Hex string. --- dvcid.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dvcid.cpp b/dvcid.cpp index 83d289c..1a8be26 100644 --- a/dvcid.cpp +++ b/dvcid.cpp @@ -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; @@ -215,7 +215,7 @@ namespace { { if ( (*it > '9' && *it < 'A') || - (*it < '0' || static_cast(*it) > 'Z') + (*it < '0' || static_cast(*it) > 'F') ) { return false; } }