[botan-devel] Botan 1.11.25 bug in DataSource

Jack Lloyd lloyd at randombit.net
Thu Dec 31 12:00:53 EST 2015


Hi Falko,

Thank for the report, this is fixed in trunk now for the upcoming
1.11.26 release.

Best,
 Jack

On Mon, Dec 28, 2015 at 07:21:09PM +0100, Falko Strenzke wrote:
> Hi Jack,
> 
> I just found a bug in data_src.cpp of Botan 1.11.25:
> 
> ================
> size_t DataSource::discard_next(size_t n)
>    {
>    byte buf[64] = { 0 };
>    size_t discarded = 0;
> 
>    while(n)
>       {
>       const size_t got = this->read(buf, std::min(n, sizeof(buf)));
>       discarded += got;
>       n -= got;  // *******THIS LINE IS MISSING*******
>       if(got == 0)
>          break;
>       }
> 
>    return discarded;
>    }
> =================
> 
> 
> It showed up when I tried to write an S/MIME parser with Botan, since
> there the find_eoc() function is used, which in turn uses discard_next().
> 
> Falko
> 
> -- 
> 
> cryptosource logo
> 
> Dr. Falko Strenzke
> Dipl-Phys.
> Geschäftsführer /
> Managing Director
> 
> 	cryptosource GmbH
> Pallaswiesenstr. 182
> 64293 Darmstadt
> Tel.: 	+49 (0) 6151 / 86 22 379
> Fax.: 	+49 (0) 6151 / 786 65 80
> Mobil.: 	+49 (0) 177 / 898 53 28
> 
> Email: fstrenzke at cryptosource.de <mailto:fstrenzke at cryptosource.de>
> Internet: www.cryptosource.de <http://www.cryptosource.de>
> 	Geschäftsführer: Dr. Falko Strenzke
> Unternehmenssitz: Darmstadt
> Registergericht: Amtsgericht Darmstadt
> Handelsregister-Nummer: HRB 93037
> Umsatzsteuer-ID: DE294145062
> 
> 


More information about the botan-devel mailing list