aboutsummaryrefslogtreecommitdiff
path: root/net/quagga/files
diff options
context:
space:
mode:
authorBruce M Simpson <bms@FreeBSD.org>2009-12-02 05:59:11 +0000
committerBruce M Simpson <bms@FreeBSD.org>2009-12-02 05:59:11 +0000
commit293cc72b4b460207ade4b941d6f6d8cb3c6e9a8b (patch)
treeb7bb4d6832ec56a0e19bf45520edfb00bc8afcce /net/quagga/files
parentad649bc241f25dfcbdba088ce5c4ab5b701f2a6a (diff)
downloadports-293cc72b4b460207ade4b941d6f6d8cb3c6e9a8b.tar.gz
ports-293cc72b4b460207ade4b941d6f6d8cb3c6e9a8b.zip
Fix a potential buffer overflow, by increasing the size of a temporary
buffer used during BGP dump. Submitted by: Randy Bush
Notes
Notes: svn path=/head/; revision=245094
Diffstat (limited to 'net/quagga/files')
-rw-r--r--net/quagga/files/patch-bgpd__bgp_dump.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/net/quagga/files/patch-bgpd__bgp_dump.c b/net/quagga/files/patch-bgpd__bgp_dump.c
new file mode 100644
index 000000000000..759bc6534c1e
--- /dev/null
+++ b/net/quagga/files/patch-bgpd__bgp_dump.c
@@ -0,0 +1,15 @@
+--- bgpd/bgp_dump.c.orig 2009-07-28 17:35:45.000000000 +0100
++++ bgpd/bgp_dump.c 2009-12-02 05:46:16.000000000 +0000
+@@ -850,8 +850,12 @@
+ memset (&bgp_dump_updates, 0, sizeof (struct bgp_dump));
+ memset (&bgp_dump_routes, 0, sizeof (struct bgp_dump));
+
++#ifdef notsufficient
+ bgp_dump_obuf = stream_new (BGP_MAX_PACKET_SIZE + BGP_DUMP_MSG_HEADER
+ + BGP_DUMP_HEADER_SIZE);
++#else
++ bgp_dump_obuf = stream_new(16384);
++#endif
+
+ install_node (&bgp_dump_node, config_write_bgp_dump);
+