Make sure not to read beyond end of buffer
[oweals/openssl.git] / crypto / rc2 / rc2_ecb.c
index 3ac3a0f6aacf9b37e6dc9b69e107bda7d0c82582..fff86c7af897d1269c25b999e9d5c3a61b645d0f 100644 (file)
  * [including the GNU Public Licence.]
  */
 
-#include "rc2.h"
+#include <openssl/rc2.h>
 #include "rc2_locl.h"
-#include "opensslv.h"
+#include <openssl/opensslv.h>
 
-const char *RC2_version="RC2" OPENSSL_VERSION_PTEXT;
+const char RC2_version[]="RC2" OPENSSL_VERSION_PTEXT;
 
 /* RC2 as implemented frm a posting from
  * Newsgroups: sci.crypt
@@ -70,8 +70,8 @@ const char *RC2_version="RC2" OPENSSL_VERSION_PTEXT;
  * Date: 11 Feb 1996 06:45:03 GMT
  */
 
-void RC2_ecb_encrypt(unsigned char *in, unsigned char *out, RC2_KEY *ks,
-            int encrypt)
+void RC2_ecb_encrypt(const unsigned char *in, unsigned char *out, RC2_KEY *ks,
+                    int encrypt)
        {
        unsigned long l,d[2];