<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to bugs</title><link>https://sourceforge.net/p/libbt/bugs/</link><description>Recent changes to bugs</description><atom:link href="https://sourceforge.net/p/libbt/bugs/feed.rss" rel="self"/><language>en</language><lastBuildDate>Mon, 10 Aug 2009 13:16:22 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/libbt/bugs/feed.rss" rel="self" type="application/rss+xml"/><item><title>how to enable seeding option in code</title><link>https://sourceforge.net/p/libbt/bugs/24/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;I am trying to write a torrent client using libbt .It works fine and it seeding at 2kBs.If I want to seed more data what option should i enable?&lt;/p&gt;
&lt;p&gt;help please&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Anonymous</dc:creator><pubDate>Mon, 10 Aug 2009 13:16:22 -0000</pubDate><guid>https://sourceforge.netbfd2a7651cf9be2b39dbcc50b553bf28c277dd6b</guid></item><item><title>Segfault</title><link>https://sourceforge.net/p/libbt/bugs/23/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;btget 1.05 is getting a Segmentation Fault running under NetBSD 2.0.2 on sparc64&lt;/p&gt;
&lt;p&gt;ulimit -n 1024 is needed to avoid running out of files.  Some blocks download ok but then a segfault kills the program.&lt;/p&gt;
&lt;p&gt;Contact steven_grunza@ieee.org for more details if necessary.&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Anonymous</dc:creator><pubDate>Mon, 16 Jul 2007 18:58:44 -0000</pubDate><guid>https://sourceforge.net2a412e582800b08f80b4f6aa2c9d667a4f875e52</guid></item><item><title>SYSDIE when block is single dir</title><link>https://sourceforge.net/p/libbt/bugs/22/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;When single block contains only directory description&lt;br /&gt;
(without any file) btget fails check and dumps core.&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Leon Kos</dc:creator><pubDate>Tue, 27 Dec 2005 23:52:50 -0000</pubDate><guid>https://sourceforge.net7c2d214db3d12847143fd1e86df531728edc1fa6</guid></item><item><title>Misallocation in `recv_peermsg' function resulting in crash</title><link>https://sourceforge.net/p/libbt/bugs/21/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;Dear developers,&lt;/p&gt;
&lt;p&gt;I think i've found a small bug in the `recv_peermsg'&lt;br /&gt;
function in peer.c (1.04 release).&lt;/p&gt;
&lt;p&gt;If i understand the code correctly a message is send&lt;br /&gt;
with a 4 byte length in front of a block of data. If&lt;br /&gt;
the data length was less than 80 a stack reserved&lt;br /&gt;
memory block is used to avoid over-malloc'ing for small&lt;br /&gt;
pieces. This block was declared 80 bytes long... so it&lt;br /&gt;
would overflow if messages of aprox. 79 bytes were sent&lt;br /&gt;
for the length bytes were not accounted for in the&lt;br /&gt;
allocation.&lt;/p&gt;
&lt;p&gt;To fix, change the allocation "char msg[80]" to at&lt;br /&gt;
least "char msg[84]" or more around line 474 of peer.c&lt;/p&gt;
&lt;p&gt;With this small fix the repeated crashes that i&lt;br /&gt;
experienced are gone.&lt;/p&gt;
&lt;p&gt;Hope to be of help,&lt;/p&gt;
&lt;p&gt;Reinoud Zandijk,&lt;br /&gt;
reinoud@netbsd.org&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Anonymous</dc:creator><pubDate>Tue, 06 Sep 2005 00:00:08 -0000</pubDate><guid>https://sourceforge.net4a06bf7888ec7dc145bd6d3346f3075cd033c28d</guid></item><item><title>Check return codes everywhere</title><link>https://sourceforge.net/p/libbt/bugs/20/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;Some checks for return codes are missing.&lt;/p&gt;
&lt;p&gt;Example:&lt;br /&gt;
Please add more error handling for null pointers from&lt;br /&gt;
"malloc" in the function "net_accept".&lt;br /&gt;
&lt;a href="http://cvs.sourceforge.net/viewcvs.py/libbt/libbt/src/net.c?rev=1.8&amp;amp;view=markup"&gt;http://cvs.sourceforge.net/viewcvs.py/libbt/libbt/src/net.c?rev=1.8&amp;amp;view=markup&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Markus Elfring</dc:creator><pubDate>Sun, 17 Jul 2005 15:41:35 -0000</pubDate><guid>https://sourceforge.neta81e8a4297a2c9e3b24c3e83b88d7316bc2be0ef</guid></item><item><title>Assertion failures in peer.c</title><link>https://sourceforge.net/p/libbt/bugs/19/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;I'm getting repeated assertion failures in peer.c in the &lt;br /&gt;
function recv_peermsg(). This seems to be a client &lt;br /&gt;
sending data libbt doesn't like.&lt;/p&gt;
&lt;p&gt;One problem is the code:&lt;/p&gt;
&lt;p&gt;len = ntohl(nbo_len);&lt;br /&gt;
if (len &amp;lt;= 80) {&lt;br /&gt;
nmsg = msg;&lt;br /&gt;
} else if (len &amp;lt;= MAXMESSAGE) {&lt;br /&gt;
nmsg = btmalloc(len+sizeof(int32_t));&lt;br /&gt;
} else {  /* Too big a packet, kill the peer. */&lt;br /&gt;
peer-&amp;gt;ios.error = BTERR_LARGEPACKET;&lt;br /&gt;
return -1;&lt;br /&gt;
}&lt;br /&gt;
#if 0&lt;br /&gt;
printf("A/%d: looking for %d bytes %d available (addr &lt;br /&gt;
%d)\n", peer-&amp;gt;ios.fd, len+4, kStream_iqlen( &amp;amp;peer-&lt;br /&gt;
&amp;gt;ios), kStream_in_addr(&amp;amp;peer-&amp;gt;ios));&lt;br /&gt;
#endif&lt;br /&gt;
if (len == 0) {&lt;br /&gt;
/* keep alive */&lt;br /&gt;
err = kStream_fread( &amp;amp;peer-&amp;gt;ios, (char *)&lt;br /&gt;
&amp;amp;nbo_len, sizeof(nbo_len));&lt;br /&gt;
DIE_UNLESS(err == sizeof(nbo_len));&lt;br /&gt;
return 0;&lt;br /&gt;
}&lt;br /&gt;
DIE_UNLESS(len &amp;lt;= MAXMESSAGE &amp;amp;&amp;amp; len &amp;gt;= 0);&lt;/p&gt;
&lt;p&gt;when len &amp;lt; 0.&lt;/p&gt;
&lt;p&gt;Also later if there is another message waiting with &lt;br /&gt;
invalid len:&lt;/p&gt;
&lt;p&gt;if (res == 0) {&lt;br /&gt;
/* check if there is another message waiting */&lt;br /&gt;
err = kStream_fpeek( &amp;amp;peer-&amp;gt;ios, (char *)&lt;br /&gt;
&amp;amp;nbo_len, sizeof(nbo_len));&lt;br /&gt;
if (err == sizeof(nbo_len)) {&lt;br /&gt;
int tlen;&lt;br /&gt;
tlen = ntohl(nbo_len) + sizeof(nbo_len);&lt;br /&gt;
#if 0&lt;br /&gt;
printf("B/looking for %d bytes %d available &lt;br /&gt;
(addr %d)\n", tlen, kStream_iqlen( &amp;amp;peer-&amp;gt;ios), &lt;br /&gt;
kStream_in_addr(&amp;amp;peer-&amp;gt;ios));&lt;br /&gt;
#endif&lt;br /&gt;
DIE_UNLESS(tlen &amp;lt;= MAXMESSAGE &amp;amp;&amp;amp; tlen &lt;br /&gt;
&amp;gt;= 0);&lt;br /&gt;
if (kStream_iqlen( &amp;amp;peer-&amp;gt;ios) &amp;gt;= tlen) res &lt;br /&gt;
= 1;&lt;br /&gt;
}&lt;br /&gt;
}&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Stephen Henson</dc:creator><pubDate>Wed, 12 Jan 2005 19:54:45 -0000</pubDate><guid>https://sourceforge.net36a945e4ad08b51b18938b0227b37c01baccb98e</guid></item><item><title>bug in btString_cmp()</title><link>https://sourceforge.net/p/libbt/bugs/18/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;In btString_cmp() when two strings are of unequal &lt;br /&gt;
length but otherwise match the longer of the two should &lt;br /&gt;
be considered the greater. &lt;/p&gt;
&lt;p&gt;Swapping the along=1 and along=-1 lines fixes this.&lt;/p&gt;
&lt;p&gt;This is a problem because in some torrents it will reorder &lt;br /&gt;
a Dictionary type and produce an invalid hash.&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Stephen Henson</dc:creator><pubDate>Sun, 12 Dec 2004 16:44:46 -0000</pubDate><guid>https://sourceforge.net7b19def263c9a0e23748546f9c685d6876b85afc</guid></item><item><title>Fixes for big endian.</title><link>https://sourceforge.net/p/libbt/bugs/17/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;I've been attempting to get libbt going on an nslu2&lt;br /&gt;
device which uses an XScale processor in big endian mode. &lt;/p&gt;
&lt;p&gt;A couple of problems were apparent. &lt;/p&gt;
&lt;p&gt;1. In benc.c benc_put_int() the call to bts_printf()&lt;br /&gt;
uses an int format for the 64 bit field 'ival'&lt;/p&gt;
&lt;p&gt;2. There are several places in protocol.c where&lt;br /&gt;
misaligned 32 bit access can occur.  For example:&lt;/p&gt;
&lt;p&gt;int block = ntohl (*(int *)(msg + 1));&lt;/p&gt;
&lt;p&gt;I've attached a quick fix to these. You might want&lt;br /&gt;
something cleaner for #2.&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Anonymous</dc:creator><pubDate>Wed, 08 Dec 2004 19:12:07 -0000</pubDate><guid>https://sourceforge.net2092f559d3584a1778ee38bc72deaf8f4825e65d</guid></item><item><title>returned parameter variable size too small on Sun</title><link>https://sourceforge.net/p/libbt/bugs/16/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;The call to getsockop() uses: char error;&lt;/p&gt;
&lt;p&gt;This fails on  Sun Solaris SPARC. getsockopt returns -1.&lt;br /&gt;
errno is set to 150, EINVARG.&lt;br /&gt;
It should be: int error;&lt;br /&gt;
to reserve more space. Or better yet: socklen_t error;&lt;/p&gt;
&lt;p&gt;There are a few changes needed to get libbt to build&lt;br /&gt;
on Sun Solaris SPARC.&lt;br /&gt;
1. Use GNU tools, not the Sun tools.&lt;br /&gt;
2. Added some include files to the source and&lt;br /&gt;
autoconfig files.&lt;br /&gt;
3. Fix the getsockopt() error bug noted above.&lt;/p&gt;
&lt;p&gt;Since the lib is targeted at Linux I haven't detailed them.&lt;br /&gt;
But anyone desiring the Sun port info can reach me at&lt;br /&gt;
jburke(at)sdf.lonestar.org&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Jim Burke</dc:creator><pubDate>Fri, 24 Sep 2004 22:55:28 -0000</pubDate><guid>https://sourceforge.net9a85afe087d9479dc3c578c4aa699de8b62910ef</guid></item><item><title>integer format specifier used for long long type</title><link>https://sourceforge.net/p/libbt/bugs/15/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;In benc.c,  routine benc_put_int():&lt;br /&gt;
int benc_put_int( struct btStream *bts, btInteger *i) {&lt;br /&gt;
int res;&lt;/p&gt;
&lt;p&gt;res = bts_printf(bts, "i%de", i-&amp;gt;ival);&lt;br /&gt;
return res;&lt;br /&gt;
}&lt;/p&gt;
&lt;p&gt;The format specifier %d is used for ival, but ival is a&lt;br /&gt;
64 bit 'long long'. It should be %lld.&lt;/p&gt;
&lt;p&gt;I think it happens to work ok on little-endian&lt;br /&gt;
machines, but it didn't work on my big-endian SPARC&lt;br /&gt;
machine.&lt;br /&gt;
The big endian 64-bit value was stored as&lt;br /&gt;
00 00 00 00 12 34 56 78&lt;br /&gt;
and the 32-bit format specifier read from the start at&lt;br /&gt;
the first 00. &lt;br /&gt;
On an little endian machine it would be stored as:&lt;br /&gt;
78 56 34 12 00 00 00 00, and could be read correctly as&lt;br /&gt;
a 32-bit value.&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Jim Burke</dc:creator><pubDate>Mon, 06 Sep 2004 16:42:10 -0000</pubDate><guid>https://sourceforge.netf0a4a77ab242c865edd080da206896ca7c6ea907</guid></item></channel></rss>