commit 5e7e97338ce46c8cad125ffb0ea204ac9b7d51cb
Author:     Mattias Andrée <[email protected]>
AuthorDate: Wed May 11 16:12:04 2016 +0200
Commit:     Mattias Andrée <[email protected]>
CommitDate: Wed May 11 16:12:04 2016 +0200

    zstr_length: do not validate the radix if ZAHL_UNSAFE is used
    
    Signed-off-by: Mattias Andrée <[email protected]>

diff --git a/src/zstr_length.c b/src/zstr_length.c
index 869dbc5..7554e78 100644
--- a/src/zstr_length.c
+++ b/src/zstr_length.c
@@ -10,7 +10,7 @@ size_t
 zstr_length(z_t a, unsigned long long int radix)
 {
        size_t size_total = 1, size_temp;
-       if (radix < 2)
+       if (check(radix < 2))
                libzahl_failure(-ZERROR_INVALID_RADIX);
        zset(num, a);
        while (!zzero(num)) {

Reply via email to