View | Details | Raw Unified | Return to bug 232219 | Differences between
and this patch

Collapse All | Expand All

(-)sysutils/radmind/Makefile (-1 / +1 lines)
Lines 3-9 Link Here
3
3
4
PORTNAME=	radmind
4
PORTNAME=	radmind
5
PORTVERSION=	1.14.1
5
PORTVERSION=	1.14.1
6
PORTREVISION=	2014052201
6
PORTREVISION=	2014052202
7
CATEGORIES=	sysutils
7
CATEGORIES=	sysutils
8
MASTER_SITES=	SF/${PORTNAME}/${PORTNAME}/${PORTNAME}-${PORTVERSION}
8
MASTER_SITES=	SF/${PORTNAME}/${PORTNAME}/${PORTNAME}-${PORTVERSION}
9
9
(-)sysutils/radmind/files/patch-cksum.c (+86 lines)
Line 0 Link Here
1
--- cksum.c.orig	2018-10-13 05:20:43 UTC
2
+++ cksum.c
3
@@ -41,20 +41,20 @@ do_fcksum( int fd, char *cksum_b64 )
4
     off_t		size = 0;
5
     unsigned char	buf[ 8192 ];
6
     extern EVP_MD	*md;
7
-    EVP_MD_CTX		mdctx;
8
+    EVP_MD_CTX		*mdctx;
9
     unsigned char 	md_value[ EVP_MAX_MD_SIZE ];
10
 
11
-    EVP_DigestInit( &mdctx, md );
12
+    EVP_DigestInit( mdctx, md );
13
 
14
     while (( rr = read( fd, buf, sizeof( buf ))) > 0 ) {
15
 	size += rr;
16
-	EVP_DigestUpdate( &mdctx, buf, (unsigned int)rr );
17
+	EVP_DigestUpdate( mdctx, buf, (unsigned int)rr );
18
     }
19
     if ( rr < 0 ) {
20
 	return( -1 );
21
     }
22
 
23
-    EVP_DigestFinal( &mdctx, md_value, &md_len );
24
+    EVP_DigestFinal( mdctx, md_value, &md_len );
25
     base64_e( md_value, md_len, cksum_b64 );
26
 
27
     return( size );
28
@@ -103,13 +103,13 @@ do_acksum( char *path, char *cksum_b64, struct applefi
29
     struct as_entry		as_entries_endian[ 3 ];
30
     unsigned int		md_len;
31
     extern EVP_MD		*md;
32
-    EVP_MD_CTX          	mdctx;
33
+    EVP_MD_CTX          	*mdctx;
34
     unsigned char       	md_value[ EVP_MAX_MD_SIZE ];
35
 
36
-    EVP_DigestInit( &mdctx, md ); 
37
+    EVP_DigestInit( mdctx, md ); 
38
 
39
     /* checksum applesingle header */
40
-    EVP_DigestUpdate( &mdctx, (char *)&as_header, AS_HEADERLEN );
41
+    EVP_DigestUpdate( mdctx, (char *)&as_header, AS_HEADERLEN );
42
     size += (size_t)AS_HEADERLEN;
43
 
44
     /* endian handling, sum big-endian header entries */
45
@@ -120,12 +120,12 @@ do_acksum( char *path, char *cksum_b64, struct applefi
46
     as_entry_netswap( &as_entries_endian[ AS_DFE ] );
47
 
48
     /* checksum header entries */
49
-    EVP_DigestUpdate( &mdctx, (char *)&as_entries_endian,
50
+    EVP_DigestUpdate( mdctx, (char *)&as_entries_endian,
51
 		(unsigned int)( 3 * sizeof( struct as_entry )));
52
     size += sizeof( 3 * sizeof( struct as_entry ));
53
 
54
     /* checksum finder info data */
55
-    EVP_DigestUpdate( &mdctx, afinfo->ai.ai_data, FINFOLEN );
56
+    EVP_DigestUpdate( mdctx, afinfo->ai.ai_data, FINFOLEN );
57
     size += FINFOLEN;
58
 
59
     /* checksum rsrc fork data */
60
@@ -140,7 +140,7 @@ do_acksum( char *path, char *cksum_b64, struct applefi
61
 	    return( -1 );
62
 	}
63
 	while (( rc = read( rfd, buf, sizeof( buf ))) > 0 ) {
64
-	    EVP_DigestUpdate( &mdctx, buf, (unsigned int)rc );
65
+	    EVP_DigestUpdate( mdctx, buf, (unsigned int)rc );
66
 	    size += (size_t)rc;
67
 	}
68
 	if ( close( rfd ) < 0 ) {
69
@@ -156,7 +156,7 @@ do_acksum( char *path, char *cksum_b64, struct applefi
70
     }
71
     /* checksum data fork */
72
     while (( rc = read( dfd, buf, sizeof( buf ))) > 0 ) {
73
-	EVP_DigestUpdate( &mdctx, buf, (unsigned int)rc );
74
+	EVP_DigestUpdate( mdctx, buf, (unsigned int)rc );
75
 	size += (size_t)rc;
76
     }
77
     if ( rc < 0 ) {
78
@@ -166,7 +166,7 @@ do_acksum( char *path, char *cksum_b64, struct applefi
79
 	return( -1 );
80
     }
81
 
82
-    EVP_DigestFinal( &mdctx, md_value, &md_len );
83
+    EVP_DigestFinal( mdctx, md_value, &md_len );
84
     base64_e( ( char*)&md_value, md_len, cksum_b64 );
85
 
86
     return( size );

Return to bug 232219