Update of /cvsroot/monetdb/pathfinder/compiler/mil
In directory sfp-cvsdas-1.v30.ch3.sourceforge.com:/tmp/cvs-serv3947/compiler/mil

Modified Files:
      Tag: M5XQ
        milprint_summer.c 
Log Message:
propagated changes of Tuesday Jan 12 2010
from the XQFT branch to the M5XQ branch

  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2010/01/12 - sjoerd: compiler/mil/milprint_summer.c,1.434.2.2
  propagated changes of Tuesday Jan 12 2010
  from the development trunk to the XQFT branch
  
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    2010/01/12 - sjoerd: compiler/mil/milprint_summer.c,1.438
    propagated changes of Tuesday Jan 12 2010
    from the Nov2009 branch to the development trunk
  
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      2010/01/12 - sjoerd: compiler/mil/milprint_summer.c,1.433.6.2
      The first buf == NULL check is to help Coverity.
      The second is to defend against failing malloc.
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


Index: milprint_summer.c
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/mil/milprint_summer.c,v
retrieving revision 1.432.2.3
retrieving revision 1.432.2.4
diff -u -d -r1.432.2.3 -r1.432.2.4
--- milprint_summer.c   8 Jan 2010 09:06:10 -0000       1.432.2.3
+++ milprint_summer.c   12 Jan 2010 09:41:24 -0000      1.432.2.4
@@ -11262,9 +11262,11 @@
             /* get the type name, and assure there *is* a namespace */
             char *tpe = PFty_str(TY(LR(args)));
             char *nme;
-            if (maxbufsize < strlen(tpe) + 4) {
+            if (buf == NULL || maxbufsize < strlen(tpe) + 4) {
                 maxbufsize = strlen(tpe) + 4;
                 buf = buf ? realloc(buf, maxbufsize) : malloc(maxbufsize);
+                if (buf == NULL)
+                    PFoops(OOPS_OUTOFMEM, "can't get requested memory.");
             }
             nme = buf;
             if (strchr(tpe, ':') == NULL)  {


------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
Monetdb-pf-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-pf-checkins

Reply via email to