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 -

_______________________________________________
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint

Reply via email to