Skip to content

In File, length of returned values are not checked. #114

@defuse

Description

@defuse
            $ivsize = \openssl_cipher_iv_length($config['CIPHER_METHOD']);
            $iv = \fread($inputHandle, $ivsize);
            if ($iv === false ) {
                throw new Ex\CannotPerformOperation(
                    'Cannot read input file'
                );
            }

None of the code below that checks if $iv is actually the correct length, so if EOF was encountered (or some other weird condition), we'll get a wrong size IV. The same bug probably exists for other parameters read from the file too.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions