$NetBSD: patch-aq,v 1.1 2002/10/07 19:16:49 seb Exp $

--- plugins/srp.c.orig	Mon Apr 10 00:54:11 2000
+++ plugins/srp.c
@@ -1243,7 +1243,7 @@ static int mechanism_fill_db(char *mech_
   sasl_server_putsecret_t *putsecret;
   void *putsecret_context;
   sasl_secret_t *sec = NULL;
-  long version;
+  int32_t version;
 
   /* don't do this again if it's already set */
   if (mydb_initialized == 1)
@@ -1262,18 +1262,18 @@ static int mechanism_fill_db(char *mech_
 
   /* allocate a secret structure that we're going to save to disk */  
   sec=(sasl_secret_t *) sparams->utils->malloc(sizeof(sasl_secret_t)+
-					       4);
+					       sizeof(int32_t));
   if (sec == NULL) {
     result = SASL_NOMEM;
     return result;
   }
   
   /* set the size */
-  sec->len = 4;
+  sec->len = sizeof(int32_t);
 
   /* and insert the data */
   version = htonl(SRP_VERSION);
-  memcpy(sec->data, &version, 4);
+  memcpy(sec->data, &version, sizeof(int32_t));
 
   /* do the store */
   result = putsecret(putsecret_context,
