Changeset: 54f3fa5ff6db for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=54f3fa5ff6db
Modified Files:
        configure.ag
        geom/monetdb5/geom.c
Branch: geo
Log Message:

back-out accidental commit (changeset 5de22eb60f7a)


diffs (76 lines):

diff --git a/configure.ag b/configure.ag
--- a/configure.ag
+++ b/configure.ag
@@ -2422,8 +2422,7 @@ AC_SUBST(MSEED_LIBS, $MSEED_LIBS)
 AM_CONDITIONAL(HAVE_MSEED, test x"$have_mseed" != xno)
 
 #proj only used in geom module
-org_have_proj="auto" 
-have_proj=$org_have_proj
+have_proj="auto" 
 PROJ_INCS=''
 PROJ_LIBS=''
 AC_ARG_WITH(proj,
@@ -3577,7 +3576,6 @@ for comp in \
        'openssl      ' \
        'pcre         ' \
        'perl         ' \
-       'proj         ' \
        'pthread      ' \
        'python2      ' \
        'python3      ' \
diff --git a/geom/monetdb5/geom.c b/geom/monetdb5/geom.c
--- a/geom/monetdb5/geom.c
+++ b/geom/monetdb5/geom.c
@@ -313,37 +313,37 @@ static str transformMultiGeometry(GEOSGe
        char *params[1024];  // one for each parameter
        char *loc;
        char *str;
-       projPJ result = NULL;
+       size_t slen;
+       projPJ result;
 
 
        if (projStr == NULL) return NULL;
 
-       if (projStr[0] == 0) return NULL;
-
-       str = GDKstrdup(projStr);
-       if (str == NULL) return NULL;
+       slen = strlen(projStr);
+
+       if (slen == 0) return NULL;
+
+       str = GDKmalloc(slen+1);
+       strcpy(str, projStr);
 
        // first we split the string into a bunch of smaller strings,
        // based on the " " separator
 
-       t = 0;
-       params[t++] = str; // 1st param, we'll null terminate at the " " soon
+       params[0] = str; // 1st param, we'll null terminate at the " " soon
 
        loc = str;
-       while  (loc != NULL && *loc != 0 && t < 1024)
+       t = 1;
+       while  ((loc != NULL) && (*loc != 0) )
        {
                loc = strchr(loc, ' ');
                if (loc != NULL)
                {
                        *loc = 0; // null terminate
-                       params[t++] = ++loc;
+                       params[t] = loc+1;
+                       loc++; // next char
+                       t++; //next param
                }
        }
-       if (loc != NULL && *loc != 0) {
-               // more than 1024 parameters!?
-               GDKfree(str);
-               return NULL;
-       }
 
        if (!(result=pj_init(t, params)))
        {
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to