[botan-devel] Possible bug

Sviatoslav Feshchenko sviatoslav at outlook.com
Sun Feb 16 19:52:50 EST 2014


Dear Botan developers,

I suspect there may be a bug in the library or I made an error somewhere (and if so I apologize). My environment is as follows:

Botan version: 1.11.8
OS: Linux Mint 16 Cinnamon 64-bit
G++ v 4.8.1

Pipe::start_msg() causes a segmentation fault depending on how the pipe was set up, as demonstrated in the compilable code below. Many thanks for looking into this.



#include "botan/botan.h"
#include "botan/bzip2.h"

using namespace Botan;

int main()
{
    AutoSeeded_RNG rng;
    SymmetricKey key(rng, 32);
    InitializationVector iv(rng, 16);

    Keyed_Filter * decryptor = get_cipher("AES-256/CBC", key, iv, DECRYPTION);
    Bzip_Decompression * decompressor = new Bzip_Decompression();

    //start_msg() will seg fault if pipe is set up in this way
    Pipe * decryptionPipe = new Pipe(decryptor, decompressor);

    //if the pipe is set up in any of the following ways, start_msg() executes normally
//    Pipe * decryptionPipe = new Pipe(decompressor, decryptor);
//    Pipe * decryptionPipe = new Pipe(decryptor);
//    Pipe * decryptionPipe = new Pipe(decompressor);

    //seg fault here
    decryptionPipe->start_msg();

    return 0;
}
 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.randombit.net/pipermail/botan-devel/attachments/20140216/27502ea8/attachment.html>


More information about the botan-devel mailing list