]> granicus.if.org Git - pdns/commitdiff
fix base32 padding issue as found by Aki Tuomi and solved by Michel Stol
authorBert Hubert <bert.hubert@netherlabs.nl>
Fri, 7 Jan 2011 10:32:18 +0000 (10:32 +0000)
committerBert Hubert <bert.hubert@netherlabs.nl>
Fri, 7 Jan 2011 10:32:18 +0000 (10:32 +0000)
git-svn-id: svn://svn.powerdns.com/pdns/trunk/pdns@1827 d19b8d6e-7fed-0310-83ef-9ca221ded41b

pdns/base32.cc

index 27f4dfd60937211c18434bc304b5312e424ba928..0c41b07662d4bc70321886d5f116715c97422408 100644 (file)
@@ -112,7 +112,7 @@ string fromBase32Hex(const std::string& input)
       toWrite = 0;
     }
   }
-  ret.append(block, (7+toWrite*5)/8); // round up
+  ret.append(block, (toWrite*5)/8); 
 
   return ret;
 }