]> granicus.if.org Git - php/commitdiff
that was a silly one
authorSascha Schumann <sas@php.net>
Sun, 25 Apr 1999 21:13:21 +0000 (21:13 +0000)
committerSascha Schumann <sas@php.net>
Sun, 25 Apr 1999 21:13:21 +0000 (21:13 +0000)
ext/mcrypt/mcrypt.c

index 989d43542fd1f1ac866364dddb0d62a796017a0e..3382b304b467ac049e1e396c04d5816a314b1608 100644 (file)
@@ -202,12 +202,12 @@ PHP_FUNCTION(mcrypt_ofb)
        convert_to_string(key);
        convert_to_string(iv);
 
+       bsize = get_block_size(cipher->value.lval);
        if(iv->value.str.len != bsize) {
                php3_error(E_WARNING, MCRYPT_IV_WRONG_SIZE);
                RETURN_FALSE;
        }
 
-       bsize = get_block_size(cipher->value.lval);
        nr = (data->value.str.len + bsize - 1) / bsize;
        nsize = nr * bsize;
 
@@ -251,12 +251,12 @@ PHP_FUNCTION(mcrypt_cfb)
        convert_to_string(key);
        convert_to_string(iv);
 
+       bsize = get_block_size(cipher->value.lval);
        if(iv->value.str.len != bsize) {
                php3_error(E_WARNING, MCRYPT_IV_WRONG_SIZE);
                RETURN_FALSE;
        }
 
-       bsize = get_block_size(cipher->value.lval);
        nr = (data->value.str.len + bsize - 1) / bsize;
        nsize = nr * bsize;