[Rpm-maint] digest_beecrypt cleanup

Panu Matilainen pmatilai at laiskiainen.org
Wed Aug 28 11:39:35 UTC 2013


On 08/28/2013 11:18 AM, Michael Schroeder wrote:
> On Tue, Aug 27, 2013 at 05:41:42PM +0200, Michael Schroeder wrote:
>>
>> Hi Panu & al,
>>
>> the attached patch cleans up the code in digest_beecrypt:
>> [...]
>> -	    rc = pgpMpiSet(qbits, sig->data, p, pend);
>> +	    rc = pgpMpiSet(qbits, sig->data);
>
> Deleted "p" parameter by mistake.
>
>> [...]
>> -    for (i = 0; p < pend && i < sigalg->mpis; i++, p += pgpMpiLen(p)) {
>> +    for (i = 0; i < sigalg->mpis && p + 2 <= pend; i++, p += pgpMpiLen(p)) {
>> +        int mpil = pgpMpiLen(p);
>> +        if (p + pgpMpiLen(p) > pend)
>> +	    break;
>>   	if (sigtype == PGPSIGTYPE_BINARY || sigtype == PGPSIGTYPE_TEXT) {
>> -	    if (sigalg->setmpi(sigalg, i, p, pend))
>> +	    if (sigalg->setmpi(sigalg, i, p))
>>   		break;
>
> "mpil" isn't used, I wanted to reduce the pgpMipLen() calls, but
> got interrupted.

Heh, know the feeling.

>
> Sorry about that. New version of patch attached.

No objections to the changes as such, but please split the patch up a 
bit: at the very least separate the interface change from the 
beecrypt-cleanups, but I wouldn't mind the beecrypt cleanups further 
split up either. That bit of extra work pays itself back every time when 
the inevitable git-bisect time cometh...

	- Panu -



More information about the Rpm-maint mailing list