summaryrefslogtreecommitdiff
path: root/src/KM_util.h
diff options
context:
space:
mode:
authorjhurst <jhurst@cinecert.com>2009-10-03 20:21:27 +0000
committerjhurst <>2009-10-03 20:21:27 +0000
commitb75bb9210f184d2a5261b824d2fc8b1ce23db641 (patch)
tree8948e95263367be41c4f0fa2d8489dc38de5ecc8 /src/KM_util.h
parent85ce1b824ba6e07dda2a66f23c78d26edcb90c00 (diff)
decoder bug fixes
Diffstat (limited to 'src/KM_util.h')
-rwxr-xr-xsrc/KM_util.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/KM_util.h b/src/KM_util.h
index 28bea68..9ba6dc5 100755
--- a/src/KM_util.h
+++ b/src/KM_util.h
@@ -283,6 +283,8 @@ namespace Kumu
inline bool DecodeHex(const char* str) {
ui32_t char_count;
m_HasValue = ( hex2bin(str, m_Value, SIZE, &char_count) == 0 );
+ if ( m_HasValue && char_count != SIZE )
+ m_HasValue = false;
return m_HasValue;
}
@@ -297,6 +299,8 @@ namespace Kumu
inline bool DecodeBase64(const char* str) {
ui32_t char_count;
m_HasValue = ( base64decode(str, m_Value, SIZE, &char_count) == 0 );
+ if ( m_HasValue && char_count != SIZE )
+ m_HasValue = false;
return m_HasValue;
}