From 00a59d0f6607ace869ce060749af8e48cc14a4b5 Mon Sep 17 00:00:00 2001
From: Antoine Regimbeau <antoine.regimbeau@c-s.fr>
Date: Mon, 22 Jan 2018 17:44:43 +0100
Subject: [PATCH] BUG: Mantis 1507 option array used in gdal need to end with
 nullptr

---
 .../Conversion/include/otbLabelImageToOGRDataSourceFilter.txx   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Modules/Segmentation/Conversion/include/otbLabelImageToOGRDataSourceFilter.txx b/Modules/Segmentation/Conversion/include/otbLabelImageToOGRDataSourceFilter.txx
index 7bfeed219d..0d41eba032 100644
--- a/Modules/Segmentation/Conversion/include/otbLabelImageToOGRDataSourceFilter.txx
+++ b/Modules/Segmentation/Conversion/include/otbLabelImageToOGRDataSourceFilter.txx
@@ -215,7 +215,7 @@ LabelImageToOGRDataSourceFilter<TInputImage>
     //Call GDALPolygonize()
     char ** options;
     options = ITK_NULLPTR;
-    char * option[1];
+    char * option[2]= { nullptr , nullptr } ;
     if (m_Use8Connected == true)
     {
       std::string opt("8CONNECTED:8");
-- 
GitLab