* [#16111](http://bugzilla.scilab.org/show_bug.cgi?id=16111): `isglobal` was not supporting non-scalar array of strings as input.
* [#16144](http://bugzilla.scilab.org/show_bug.cgi?id=16144): Addition of sparse matrices gave incorrect results.
* [#16174](http://bugzilla.scilab.org/show_bug.cgi?id=16174): `libraryinfo` yielded 0x0 matrix of strings for libs without macro
+* [#16208](http://bugzilla.scilab.org/show_bug.cgi?id=16208): Using 3D string matrix with old C-api gateways may crash Scilab.
types::String *pS = ((types::InternalType*)_piAddress)->getAs<types::String>();
//non cummulative length
- int iSize = pS->getSize();
+ int iSize = (*_piRows)*(*_piCols);
if (_pstStrings == NULL || *_pstStrings == NULL)
{
for (int i = 0 ; i < iSize; i++)
--- /dev/null
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2019 - Stéphane MOTTELET
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+//
+//
+// <-- CLI SHELL MODE -->
+// <-- NO CHECK REF -->
+//
+// <-- Non-regression test for bug 16208 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/16208
+//
+// <-- Short Description -->
+// Using 3D string matrix with old C-api gateways may crash Scilab
+
+x=string([1 2;3 4]);x(:,:,2)=x;
+assert_checkequal(gettext(x),x(:,:,1))
+