Update of /cvsroot/monetdb/sql/src/backends/monet5/merovingian
In directory sfp-cvsdas-4.v30.ch3.sourceforge.com:/tmp/cvs-serv4737
Modified Files:
Tag: Feb2010
ChangeLog.Feb2010 control.c
Log Message:
Fix for bug #2982104, make sure we also record that we enlarged the buffer when
data no longer fits.
Index: control.c
===================================================================
RCS file: /cvsroot/monetdb/sql/src/backends/monet5/merovingian/control.c,v
retrieving revision 1.8
retrieving revision 1.8.2.1
diff -u -d -r1.8 -r1.8.2.1
--- control.c 7 Jan 2010 15:24:31 -0000 1.8
+++ control.c 7 Apr 2010 12:24:36 -0000 1.8.2.1
@@ -135,7 +135,8 @@
return(strdup("failed to allocate memory"));
while ((len = recv(sock, buf + bufpos, buflen - bufpos, 0)) >
0) {
if (len == buflen - bufpos) {
- bufp = realloc(buf, sizeof(char) * buflen * 2);
+ buflen *= 2;
+ bufp = realloc(buf, sizeof(char) * buflen);
if (bufp == NULL) {
free(buf);
return(strdup("failed to allocate more
memory"));
Index: ChangeLog.Feb2010
===================================================================
RCS file:
/cvsroot/monetdb/sql/src/backends/monet5/merovingian/ChangeLog.Feb2010,v
retrieving revision 1.1.2.4
retrieving revision 1.1.2.5
diff -u -d -r1.1.2.4 -r1.1.2.5
--- ChangeLog.Feb2010 29 Mar 2010 17:59:14 -0000 1.1.2.4
+++ ChangeLog.Feb2010 7 Apr 2010 12:24:36 -0000 1.1.2.5
@@ -1,6 +1,13 @@
# ChangeLog file for sql/src/backends/monet5/merovingian
# This file is updated with mchangelog
+ 07 Apr 2010; Fabian Groffen <[email protected]> control.c:
+ Fix logic in buffer enlargment, causing bug #2982104. This bug
+ became visible when receiving more data from merovingian(1) than would
+ fit in the originally allocated buffer. This could happen quite
+ easily for instance with `monetdb status` when there are many
+ databases.
+
29 Mar 2010; Fabian Groffen <[email protected]> database.c:
Fixed an issue where merovingian(1) would lock up or crash when
destroying a database failed.
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Monetdb-sql-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-sql-checkins