On Thu, 23 Feb 2023 22:50:17 GMT, Kevin Rushforth <k...@openjdk.org> wrote:
>> Thiago Milczarek Sayao has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Improve exception > > modules/javafx.graphics/src/main/native-glass/gtk/GlassApplication.cpp line > 118: > >> 116: // Major version is checked before loading >> 117: if (version == 3) { >> 118: if(gtk_check_version(version, GTK_3_MIN_MINOR_VERSION, >> GTK_3_MIN_MICRO_VERSION)) { > > Minor: add space after `if` Done. > modules/javafx.graphics/src/main/native-glass/gtk/GlassApplication.cpp line > 120: > >> 118: if(gtk_check_version(version, GTK_3_MIN_MINOR_VERSION, >> GTK_3_MIN_MICRO_VERSION)) { >> 119: char message[100]; >> 120: std::sprintf(message, "Minimum GTK version required is >> %d.%d.%d. System has %d.%d.%d.", > > Please change this to `snprintf`, which take the length of the array. We > should not be using `sprintf` directly as that can lead to buffer overflow. Done. ------------- PR: https://git.openjdk.org/jfx/pull/999