pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc Fix small bug in bittorrent message handling.
details: https://anonhg.NetBSD.org/pkgsrc/rev/a0eaf783c512
branches: trunk
changeset: 498944:a0eaf783c512
user: reinoud <reinoud%pkgsrc.org@localhost>
date: Mon Sep 05 23:41:13 2005 +0000
description:
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:
doc/CHANGES | 4 +++-
net/btget/Makefile | 3 ++-
net/btget/distinfo | 4 ++--
net/btget/patches/patch-ab | 11 ++++++++++-
4 files changed, 17 insertions(+), 5 deletions(-)
diffs (64 lines):
diff -r c0d78126cca1 -r a0eaf783c512 doc/CHANGES
--- a/doc/CHANGES Mon Sep 05 18:15:11 2005 +0000
+++ b/doc/CHANGES Mon Sep 05 23:41:13 2005 +0000
@@ -1,4 +1,4 @@
-$NetBSD: CHANGES,v 1.11048 2005/09/05 18:15:11 tv Exp $
+$NetBSD: CHANGES,v 1.11049 2005/09/05 23:41:13 reinoud Exp $
Changes to the packages collection and infrastructure in 2005:
@@ -3934,3 +3934,5 @@
Updated lang/gawk to 3.1.5 [wiz 2005-09-05]
Updated textproc/flyspell to 1.7j [wiz 2005-09-05]
Updated databases/phpPgAdmin to 3.5.5 [tv 2005-09-05]
+ Updated net/btget to 1.04nb1 [reinoud 2005-09-06]
+
diff -r c0d78126cca1 -r a0eaf783c512 net/btget/Makefile
--- a/net/btget/Makefile Mon Sep 05 18:15:11 2005 +0000
+++ b/net/btget/Makefile Mon Sep 05 23:41:13 2005 +0000
@@ -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 -r c0d78126cca1 -r a0eaf783c512 net/btget/distinfo
--- a/net/btget/distinfo Mon Sep 05 18:15:11 2005 +0000
+++ b/net/btget/distinfo Mon Sep 05 23:41:13 2005 +0000
@@ -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 -r c0d78126cca1 -r a0eaf783c512 net/btget/patches/patch-ab
--- a/net/btget/patches/patch-ab Mon Sep 05 18:15:11 2005 +0000
+++ b/net/btget/patches/patch-ab Mon Sep 05 23:41:13 2005 +0000
@@ -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 @@
# 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;
Home |
Main Index |
Thread Index |
Old Index