Fixed uint deserialization

This commit is contained in:
arkpar 2016-04-27 14:39:46 +02:00
parent b16fa5cc34
commit bf62357731
1 changed files with 1 additions and 1 deletions

View File

@ -797,7 +797,7 @@ macro_rules! construct_uint {
fn visit_str<E>(&mut self, value: &str) -> Result<Self::Value, E> where E: serde::Error {
// 0x + len
if value.len() > 2 + $n_words * 16 {
if value.len() > 2 + $n_words * 16 || value.len() < 2 {
return Err(serde::Error::custom("Invalid length."));
}