Package: shishi / 1.0.2-6

64bigendian-ftbfs.diff Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
Description: fix 64-bit ftbfs
Author: Aurelien Jarno <aurelien@aurel32.net>
Bug-Debian: http://bugs.debian.org/670316

--- shishi-1.0.1.orig/db/file.c
+++ shishi-1.0.1/db/file.c
@@ -435,7 +435,7 @@ read_key (Shisa * dbh,
 
   memset (&tmpkey, 0, sizeof (tmpkey));
 
-  rc = fscanf (fh, "%u %u %u %u %u %u", &tmpkey.etype, &tmpkey.keylen,
+  rc = fscanf (fh, "%u %zu %zu %zu %u %u", &tmpkey.etype, &tmpkey.keylen,
 	       &tmpkey.saltlen, &tmpkey.str2keyparamlen, &passwdlen,
 	       &tmpkey.priority);
   if (rc != 5 && rc != 6)
--- shishi-1.0.1.orig/lib/asn1.c
+++ shishi-1.0.1/lib/asn1.c
@@ -124,8 +124,10 @@ shishi_asn1_read_inline (Shishi * handle
 			 const char *field, char *data, size_t * datalen)
 {
   int rc;
+  int tmp = (int) *datalen;
 
-  rc = asn1_read_value (node, field, (unsigned char *) data, (int *) datalen);
+  rc = asn1_read_value (node, field, (unsigned char *) data, &tmp);
+  *datalen = tmp;
   if (rc != ASN1_SUCCESS)
     {
       shishi_error_set (handle, asn1_strerror (rc));