[Rpm-maint] digest_beecrypt cleanup
Michael Schroeder
mls at suse.de
Wed Aug 28 08:18:53 UTC 2013
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.
Sorry about that. New version of patch attached.
M.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: beedigest.diff
Type: text/x-patch
Size: 14549 bytes
Desc: not available
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20130828/89697d98/attachment-0001.bin>
More information about the Rpm-maint
mailing list