Update of /cvsroot/monetdb/sql/src/server
In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv8860/src/server

Modified Files:
      Tag: Nov2009
        sql_scan.mx 
Log Message:
propagated changes of Friday Oct 30 2009
from the Aug2009 branch to the Nov2009 branch

  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2009/10/30 - sjoerd: src/server/sql_scan.mx,1.151.2.2
  Hardening: deal with failing realloc in buffer streams.
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


Index: sql_scan.mx
===================================================================
RCS file: /cvsroot/monetdb/sql/src/server/sql_scan.mx,v
retrieving revision 1.155
retrieving revision 1.155.2.1
diff -u -d -r1.155 -r1.155.2.1
--- sql_scan.mx 25 Sep 2009 12:54:29 -0000      1.155
+++ sql_scan.mx 30 Oct 2009 21:38:04 -0000      1.155.2.1
@@ -739,7 +739,10 @@
                                token = APPROXNUM;
                }
        }
-       
+
+       if (cur == EOF && lc->rs->buf == NULL) /* malloc failure */
+               return EOF;
+
        if (token) {
                if (cur != EOF)
                        utf8_putchar(lc, cur);
@@ -926,6 +929,9 @@
        struct scanner *lc = &c->scanner;
        int token = 0;
 
+       if (lc->rs->buf == NULL) /* malloc failure */
+               return EOF;
+
        if (lc->yynext) {
                int next = lc->yynext;
 


------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Monetdb-sql-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-sql-checkins

Reply via email to