help: fix invalid memory access on examples 81/21381/3
Clément DAVID [Fri, 21 Feb 2020 08:50:16 +0000 (09:50 +0100)]
Change-Id: If42cdad8da0eb33cde30af4c7798cdce9e395cae

scilab/modules/differential_equations/src/fortran/xerrwv.f

index aa0deaf..a581586 100644 (file)
@@ -59,13 +59,15 @@ c-----------------------------------------------------------------------
 cDEC$ ATTRIBUTES DLLIMPORT:: /eh0001/
       common /eh0001/ mesflg, lunit
       integer num, imess, imode
-      character*80 str
+      character*81 str
       imode = 0
 c-----------------------------------------------------------------------
       if (mesflg .eq. 0) go to 100
 c get logical unit number. ---------------------------------------------
 cstd      lun = lunit
       lun = 6
+c clear the string for C compatibility ---------------------------------
+      str(1:81) = ''
 c get number of words in message. --------------------------------------
       nch = min(len(msg),80)
 c write the message. ---------------------------------------------------