Don't do arithmetic on @void *@ pointers.
authormdw <mdw>
Sun, 8 Oct 2000 12:07:04 +0000 (12:07 +0000)
committermdw <mdw>
Sun, 8 Oct 2000 12:07:04 +0000 (12:07 +0000)
pkcs1.c

diff --git a/pkcs1.c b/pkcs1.c
index f725f41..dd19569 100644 (file)
--- 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 --- */