diff options
author | rillig <rillig> | 2007-12-01 13:39:05 +0000 |
---|---|---|
committer | rillig <rillig> | 2007-12-01 13:39:05 +0000 |
commit | 0b312f74a90aec3088d922b93b5d3c0294f275c2 (patch) | |
tree | 6954e56ab8df057b310bf026cef8406202fa64d1 /net | |
parent | 3866450cd2c3c48ab5f863a673fd94919fbd78e0 (diff) | |
download | pkgsrc-0b312f74a90aec3088d922b93b5d3c0294f275c2.tar.gz |
Fixed invalid lvalue cast and reminded the programmers that the return
value of sscanf needs to be checked.
Diffstat (limited to 'net')
-rw-r--r-- | net/xmftp/distinfo | 4 | ||||
-rw-r--r-- | net/xmftp/patches/patch-ac | 28 |
2 files changed, 26 insertions, 6 deletions
diff --git a/net/xmftp/distinfo b/net/xmftp/distinfo index 9f0d7e65e1f..bc85fd24f84 100644 --- a/net/xmftp/distinfo +++ b/net/xmftp/distinfo @@ -1,11 +1,11 @@ -$NetBSD: distinfo,v 1.4 2007/07/28 01:30:01 joerg Exp $ +$NetBSD: distinfo,v 1.5 2007/12/01 13:39:05 rillig Exp $ SHA1 (xmftp-1.0.4.tar.gz) = c39b14cabced594a045def93e363a9a6eb069b0b RMD160 (xmftp-1.0.4.tar.gz) = 0d31d84430292d71951df78770552be61eb199a3 Size (xmftp-1.0.4.tar.gz) = 152614 bytes SHA1 (patch-aa) = 455222cbb7396d87844f44acbc2203c36b580952 SHA1 (patch-ab) = c6f54a9ba8b3af66b6da0f04618f6a0d41828245 -SHA1 (patch-ac) = c060df8258065fb8b045a8648aa0de0fd1d9082a +SHA1 (patch-ac) = 4e93bf747dde25f385604a34245b11c859288fea SHA1 (patch-ad) = a171713f505944f2f10c203093cca884e68823ec SHA1 (patch-ae) = 1a863ac53ffa46e838f2f88029b6ab26847f96b2 SHA1 (patch-af) = 79fdee0097ee8c83b6e698ac7325382bceb7ab04 diff --git a/net/xmftp/patches/patch-ac b/net/xmftp/patches/patch-ac index ab92bd27bb5..9384ae2fd4d 100644 --- a/net/xmftp/patches/patch-ac +++ b/net/xmftp/patches/patch-ac @@ -1,7 +1,7 @@ -$NetBSD: patch-ac,v 1.1.1.1 2002/04/21 10:47:32 rh Exp $ +$NetBSD: patch-ac,v 1.2 2007/12/01 13:39:05 rillig Exp $ ---- ftplib/ftplib.c.orig Tue Apr 16 20:13:05 2002 -+++ ftplib/ftplib.c +--- ftplib/ftplib.c.orig 1997-08-20 21:29:58.000000000 +0200 ++++ ftplib/ftplib.c 2007-12-01 14:37:55.000000000 +0100 @@ -25,10 +25,10 @@ #include "../ui/xmftp.h" #include "../ui/operations.h" @@ -24,7 +24,7 @@ $NetBSD: patch-ac,v 1.1.1.1 2002/04/21 10:47:32 rh Exp $ #include <sys/types.h> #include <sys/socket.h> #include <netinet/in.h> -@@ -93,7 +93,7 @@ +@@ -93,7 +93,7 @@ static char *version = GLOBALDEF int ftplib_debug = 0; @@ -33,3 +33,23 @@ $NetBSD: patch-ac,v 1.1.1.1 2002/04/21 10:47:32 rh Exp $ #define net_read read #define net_write write #define net_close close +@@ -410,12 +410,13 @@ static int FtpPort(netbuf *nControl) + return -1; + cp++; + sscanf(cp,"%d,%d,%d,%d,%d,%d",&v[2],&v[3],&v[4],&v[5],&v[0],&v[1]); +- (unsigned char)sin.sa.sa_data[2] = v[2]; +- (unsigned char)sin.sa.sa_data[3] = v[3]; +- (unsigned char)sin.sa.sa_data[4] = v[4]; +- (unsigned char)sin.sa.sa_data[5] = v[5]; +- (unsigned char)sin.sa.sa_data[0] = v[0]; +- (unsigned char)sin.sa.sa_data[1] = v[1]; ++ /* TODO: check that sscanf returns 6 */ ++ sin.sa.sa_data[2] = (unsigned char)v[2]; ++ sin.sa.sa_data[3] = (unsigned char)v[3]; ++ sin.sa.sa_data[4] = (unsigned char)v[4]; ++ sin.sa.sa_data[5] = (unsigned char)v[5]; ++ sin.sa.sa_data[0] = (unsigned char)v[0]; ++ sin.sa.sa_data[1] = (unsigned char)v[1]; + sData = socket(PF_INET,SOCK_STREAM,IPPROTO_TCP); + if (sData == -1) + { |