summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorreinoud <reinoud>2005-09-05 23:41:13 +0000
committerreinoud <reinoud>2005-09-05 23:41:13 +0000
commitbe1e30e31f8b76df13858f6703274cd0459abfa0 (patch)
treee61bc4f584ca66e9fe1fba0a7df60095e9c39d4e /net
parent2bc0b3bf622e7cfd169f60a5f9b2e299e0ae3a1f (diff)
downloadpkgsrc-be1e30e31f8b76df13858f6703274cd0459abfa0.tar.gz
Fix small bug in bittorrent message handling.
If i understand the code correctly a message is send with a 4 byte length in front of a block of data. If the data length was less than 80 a stack reserved memory block was used to avoid over-malloc'ing for small pieces. This block was declared 80 bytes long... so it would overflow if messages of aprox. 80 bytes were sent for the length bytes were not accounted for. Claimed more for certain. With this small fix the repeated crashes that i experienced are gone. Author has been notified of the possible problem.
Diffstat (limited to 'net')
-rw-r--r--net/btget/Makefile3
-rw-r--r--net/btget/distinfo4
-rw-r--r--net/btget/patches/patch-ab11
3 files changed, 14 insertions, 4 deletions
diff --git a/net/btget/Makefile b/net/btget/Makefile
index 1b1f542e07f..829aa97633d 100644
--- a/net/btget/Makefile
+++ b/net/btget/Makefile
@@ -1,8 +1,9 @@
-# $NetBSD: Makefile,v 1.1.1.1 2005/08/05 22:00:49 reinoud Exp $
+# $NetBSD: Makefile,v 1.2 2005/09/05 23:41:13 reinoud Exp $
#
DISTNAME= libbt-1.04
PKGNAME= ${DISTNAME:S/libbt/btget/}
+PKGREVISION= 1
CATEGORIES= net
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=libbt/}
diff --git a/net/btget/distinfo b/net/btget/distinfo
index 39decf93d93..1837164be03 100644
--- a/net/btget/distinfo
+++ b/net/btget/distinfo
@@ -1,7 +1,7 @@
-$NetBSD: distinfo,v 1.1.1.1 2005/08/05 22:00:49 reinoud Exp $
+$NetBSD: distinfo,v 1.2 2005/09/05 23:41:13 reinoud Exp $
SHA1 (libbt-1.04.tar.gz) = ee65205f3e5575d86d5fec0b2958bb8855ec0fa5
RMD160 (libbt-1.04.tar.gz) = a6b827fa1d5dc7a27ab78fefe2ac5009ef115f2a
Size (libbt-1.04.tar.gz) = 309186 bytes
SHA1 (patch-aa) = 3f045800da8d372d45fcf59fe2f1f9fb0a288a20
-SHA1 (patch-ab) = dc53a0a44dcc3475122d87280deb2ba946f79588
+SHA1 (patch-ab) = 9111ce4a3f5332fd02dc218990f1e75a3e71b563
diff --git a/net/btget/patches/patch-ab b/net/btget/patches/patch-ab
index 0c52b0473f8..0bb52f66d38 100644
--- a/net/btget/patches/patch-ab
+++ b/net/btget/patches/patch-ab
@@ -1,4 +1,4 @@
-$NetBSD: patch-ab,v 1.1.1.1 2005/08/05 22:00:49 reinoud Exp $
+$NetBSD: patch-ab,v 1.2 2005/09/05 23:41:13 reinoud Exp $
--- src/peer.c.orig 2005-04-27 06:47:47.000000000 +0200
+++ src/peer.c
@@ -10,3 +10,12 @@ $NetBSD: patch-ab,v 1.1.1.1 2005/08/05 22:00:49 reinoud Exp $
# if HAVE_UNISTD_H
# include <unistd.h>
# endif
+@@ -473,7 +474,7 @@ recv_peermsg( btContext *ctx, btPeer *pe
+ btDownload *dl = ctx->downloads[peer->download];
+ int32_t nbo_len;
+ int len;
+- char msg[80];
++ char msg[128];
+ char *nmsg, *param;
+ int res = 0;
+ int err;