diff --git a/doc/dox/whatsnew.dox b/doc/dox/whatsnew.dox
index 979b8b5ca2..55aafa90b6 100644
--- a/doc/dox/whatsnew.dox
+++ b/doc/dox/whatsnew.dox
@@ -18,6 +18,7 @@ Changes, compared to \ref page_whatsnew_V4_0_0 "v4.0.0" include:
BREAKING: renamed library JKQTCommonStatisticsAndMath to JKQTMath. Note: A CMake-ALIAS-Library JKQTCommonStatisticsAndMath was also added to ease transition for users
BREAKING: JKQTFastPlotter class and library are now deprecated and will be removed in future versions!
BREAKING: The QMake build system is deprecated and will not get the same love and atttention as the recommended CMake system. The QMake scripts might be removed in future versions!
+ FIXED/SECURITY not using \c sprintf() any more ... replaced by e.g. \c snprintf() , which is more secure.
FIXED issue #102: Fix CMake Compile Error: JKQTCommonLib no properly linked in JKQTMath static build (thanks to user:Neumann-A for reporting)
CLEANUP (BREAKING) of library structure
NEW: Using precompiled headers in CMake-build to speed up build times
diff --git a/lib/jkqtmath/jkqtplinalgtools.h b/lib/jkqtmath/jkqtplinalgtools.h
index 606f0f7c3a..6b30dfbb38 100644
--- a/lib/jkqtmath/jkqtplinalgtools.h
+++ b/lib/jkqtmath/jkqtplinalgtools.h
@@ -125,7 +125,7 @@ inline std::string jkqtplinalgMatrixToString(T* matrix, long L, long C, int widt
for (long c=0; c0) ost<<", ";
char buf[500];
- sprintf(buf, format.c_str(), jkqtp_todouble(matrix[jkqtplinalgMatIndex(l,c,C)]));
+ snprintf(buf, 500, format.c_str(), jkqtp_todouble(matrix[jkqtplinalgMatIndex(l,c,C)]));
ost<";
ost.precision(precision);
ost.width(width);
char buf[500];
- sprintf(buf, format.c_str(), val);
+ snprintf(buf, 500, format.c_str(), val);
ost<";
}
@@ -277,7 +277,7 @@ inline std::string jkqtplinalgMatrixToHTMLString(T* matrix, long L, long C, int
jkqtplinalgPM1ToRWBColors(0.5, rcp, gcp, bcp);
jkqtplinalgPM1ToRWBColors(1, rp, gp, bp);
}
- sprintf(buf, ""
+ snprintf(buf, 8192, ""
" %9.3lg | "
" — | "
" %9.3lg | "
|
|