[MOAB-dev] r2809 - MOAB/trunk/parallel

kraftche at cae.wisc.edu kraftche at cae.wisc.edu
Thu Apr 9 09:37:51 CDT 2009


Author: kraftche
Date: 2009-04-09 09:37:50 -0500 (Thu, 09 Apr 2009)
New Revision: 2809

Modified:
   MOAB/trunk/parallel/MBParallelComm.cpp
Log:
fix buffer overflow

Modified: MOAB/trunk/parallel/MBParallelComm.cpp
===================================================================
--- MOAB/trunk/parallel/MBParallelComm.cpp	2009-04-08 18:09:25 UTC (rev 2808)
+++ MOAB/trunk/parallel/MBParallelComm.cpp	2009-04-09 14:37:50 UTC (rev 2809)
@@ -3562,6 +3562,10 @@
                        buff_ptr, buff_size, true, true, *sit,
                        tags, tag_ranges);
     RRA("Failed to count buffer in pack_send_tag.");
+    if (ownerSBuffs[ind].size() < buff_size) {
+      ownerSBuffs[ind].resize(buff_size);
+      buff_ptr = &ownerSBuffs[ind][0];
+    }
     int real_buff_size = 0;
     result = pack_tags(tag_ents, rit, tag_ents,
                        buff_ptr, real_buff_size, false, true, *sit,



More information about the moab-dev mailing list