Crashing while reading MapInfo layer with AUTO styleitem #4971

Closed
bx50 opened this Issue Aug 14, 2014 · 4 comments

Projects

None yet

4 participants

@bx50
bx50 commented Aug 14, 2014

Could be solved by:

--- mapfile.c.orig  2014-08-13 14:39:53.000000000 +0200
+++ mapfile.c   2014-08-13 14:40:45.000000000 +0200
@@ -3398,7 +3398,7 @@

   /* reset labels */
   for(i=0; i<class->numlabels; i++) {
-    if(class->styles[i] != NULL) {
+    if(class->labels[i] != NULL) {
       if(freeLabel(class->labels[i]) == MS_SUCCESS ) {
         msFree(class->labels[i]);
       }
@dmorissette
Contributor

I agree with this fix but am not setup to test and commit it at the moment. Hopefully @tbonfort or another dev can apply it, and possibly backport to the 6.4 stable branch as well.

@szekerest
Member

Fix applied in master and branch-6-4

@dmorissette
Contributor

Thank you @szekerest

@jratike80

Fix in included in https://github.com/mapserver/mapserver/blob/branch-7-0/mapfile.c. Nobody has confirmed that the fix prevents crashes but let's hope it does.

@jratike80 jratike80 closed this Nov 2, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment