public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] gentoo-x86 commit in net-libs/libtorrent/files: libtorrent-0.12.3-fix-fill_read_buffer-overflow.patch
@ 2008-11-02 15:35 Peter Alfredsen (loki_val)
  0 siblings, 0 replies; only message in thread
From: Peter Alfredsen (loki_val) @ 2008-11-02 15:35 UTC (permalink / raw
  To: gentoo-commits

loki_val    08/11/02 15:35:55

  Added:               
                        libtorrent-0.12.3-fix-fill_read_buffer-overflow.patch
  Log:
  Fix 'Handshake buffer overflows', upstream ticket 1337: http://libtorrent.rakshasa.no/ticket/1337
  (Portage version: 2.2_rc13/cvs/Linux 2.6.27 x86_64)

Revision  Changes    Path
1.1                  net-libs/libtorrent/files/libtorrent-0.12.3-fix-fill_read_buffer-overflow.patch

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-libs/libtorrent/files/libtorrent-0.12.3-fix-fill_read_buffer-overflow.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-libs/libtorrent/files/libtorrent-0.12.3-fix-fill_read_buffer-overflow.patch?rev=1.1&content-type=text/plain

Index: libtorrent-0.12.3-fix-fill_read_buffer-overflow.patch
===================================================================
# Fixes a crash with fill_read_buffer(...) Buffer overflow" if peer sends
# both encryption pads and their total size does not allow the subsequent
# bitfield/protocol message to be received correctly. Ticket #1337.
Index: libtorrent/src/protocol/handshake.h
===================================================================
--- libtorrent/src/protocol/handshake.h	(revision 1073)
+++ libtorrent/src/protocol/handshake.h	(working copy)
@@ -66,7 +66,7 @@
   static const uint32_t enc_pad_size         = 512;
   static const uint32_t enc_pad_read_size    = 96 + enc_pad_size + 20;
 
-  static const uint32_t buffer_size = enc_pad_read_size + 20 + enc_negotiation_size + enc_pad_size + 2 + handshake_size;
+  static const uint32_t buffer_size = enc_pad_read_size + 20 + enc_negotiation_size + enc_pad_size + 2 + handshake_size + 5;
 
   typedef ProtocolBuffer<buffer_size> Buffer;
 






^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-11-02 15:35 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-02 15:35 [gentoo-commits] gentoo-x86 commit in net-libs/libtorrent/files: libtorrent-0.12.3-fix-fill_read_buffer-overflow.patch Peter Alfredsen (loki_val)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox