diff --git a/modules/io/src/img/map_io_ipl_handler.cc b/modules/io/src/img/map_io_ipl_handler.cc
index dd1fb2981a1f8c95f407331086508253a425f450..88f2c5b5afc6cfb551f61ea5bc59b0686ce9969c 100644
--- a/modules/io/src/img/map_io_ipl_handler.cc
+++ b/modules/io/src/img/map_io_ipl_handler.cc
@@ -193,9 +193,10 @@ std::ostream& operator<< (std::ostream& out, const IPLHeader& h )
   out << "COMMENT = Created by OpenStructure \r\n";
   out << " \r\n";
   uint fillsize=h.header_length-out.tellp()+start_pos;
-  char empty[fillsize];
+  char* empty=new char[fillsize];
   std::fill_n(empty,fillsize,0);
   out.write(empty,fillsize);
+  delete[] empty;
   return out;
 }
 
@@ -256,9 +257,10 @@ std::istream& operator>> (std::istream& in, IPLHeader& h)
     }
   }while(in.peek()!=0);
   uint fillsize=h.header_length-in.tellg()+start_pos;
-  char empty[h.header_length];
+  char* empty=new char[h.header_length];
   std::fill_n(empty,fillsize,0);
   in.read(empty,fillsize);
+  delete[] empty;
   return in;
 }