Avoid potential negative array index access to cached text.
[LibreOffice.git] / external / coinmp / odr.patch
blob6e91c86415d24f62e79e0a581427d675c20e54c0
1 --- Cbc/src/CbcSolver.cpp
2 +++ Cbc/src/CbcSolver.cpp
3 @@ -970,8 +970,13 @@
4 this set of calls thread-safe.
5 */
7 +#if defined _MSC_VER
8 int CbcOrClpRead_mode = 1;
9 FILE * CbcOrClpReadCommand = stdin;
10 +#else
11 +extern int CbcOrClpRead_mode;
12 +extern FILE * CbcOrClpReadCommand;
13 +#endif
14 extern int CbcOrClpEnvironmentIndex;
16 int callCbc1(const char * input2, CbcModel & model,
17 --- Clp/src/CbcOrClpParam.cpp
18 +++ Clp/src/CbcOrClpParam.cpp
19 @@ -1233,7 +1233,11 @@
20 static char line[1000];
21 static char * where = NULL;
22 extern int CbcOrClpRead_mode;
23 +#if defined _MSC_VER || !defined COIN_HAS_CBC
24 int CbcOrClpEnvironmentIndex = -1;
25 +#else
26 +extern int CbcOrClpEnvironmentIndex;
27 +#endif
28 static size_t fillEnv()
30 #if defined(_MSC_VER) || defined(__MSVCRT__)