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
|
$NetBSD: patch-be,v 1.1 2006/09/22 13:58:46 kivinen Exp $
--- lib/sshutil/sshnet/sshinetencode.c.orig 2003-12-03 15:17:31.000000000 +0200
+++ lib/sshutil/sshnet/sshinetencode.c
@@ -31,9 +31,10 @@ size_t ssh_encode_ipaddr_array(unsigned
SSH_ASSERT(desired_len <= SSH_MAX_IPADDR_ENCODED_LENGTH);
if ((got = ssh_encode_array(buf, bufsize,
SSH_FORMAT_CHAR, (unsigned int) ip->type,
- SSH_FORMAT_UINT32, ip->mask_len,
+ SSH_FORMAT_UINT32, (SshUInt32) ip->mask_len,
SSH_FORMAT_DATA,
- ip->addr_data, SSH_IP_ADDR_LEN(ip),
+ ip->addr_data,
+ (size_t) SSH_IP_ADDR_LEN(ip),
SSH_FORMAT_END)) != desired_len)
return 0;
return desired_len;
@@ -91,7 +92,8 @@ size_t ssh_decode_ipaddr_array(const uns
if ((got = ssh_decode_array(buf + point, len - point,
SSH_FORMAT_UINT32, &mask_len,
SSH_FORMAT_DATA,
- ip->addr_data, SSH_IP_ADDR_LEN(ip),
+ ip->addr_data,
+ (size_t) SSH_IP_ADDR_LEN(ip),
SSH_FORMAT_END)) != (4 + SSH_IP_ADDR_LEN(ip)))
return 0;
|