X-Git-Url: https://git.distorted.org.uk/u/mdw/catacomb/blobdiff_plain/0586d2a1473f4fb41f83e2dd09a968e5eeaa025b..3884054be9261b4607f5f3a2d0b79695f65b851f:/pkcs1.c diff --git a/pkcs1.c b/pkcs1.c index f725f41..dd19569 100644 --- a/pkcs1.c +++ b/pkcs1.c @@ -1,6 +1,6 @@ /* -*-c-*- * - * $Id: pkcs1.c,v 1.2 2000/07/05 17:49:48 mdw Exp $ + * $Id: pkcs1.c,v 1.3 2000/10/08 12:07:04 mdw Exp $ * * PKCS#1 1.5 packing * @@ -30,6 +30,9 @@ /*----- Revision history --------------------------------------------------* * * $Log: pkcs1.c,v $ + * Revision 1.3 2000/10/08 12:07:04 mdw + * Don't do arithmetic on @void *@ pointers. + * * Revision 1.2 2000/07/05 17:49:48 mdw * Fix decoding functions, so that they don't run off the end of the * buffer. @@ -123,7 +126,7 @@ int pkcs1_cryptdecode(const void *buf, size_t sz, dstr *d, void *p) if (pp->epsz + 11 > sz) return (-1); q = buf; - qq = buf + sz; + qq = q + sz; /* --- Ensure that the block looks OK --- */ @@ -219,7 +222,7 @@ int pkcs1_sigdecode(const void *buf, size_t sz, dstr *d, void *p) if (pp->epsz + 10 > sz) return (-1); q = buf; - qq = buf + sz; + qq = q + sz; /* --- Ensure that the block looks OK --- */