From f77bd252f85e23020c7ef4058ecc478c60f00477 Mon Sep 17 00:00:00 2001 From: Omar Vega Ramos Date: Fri, 22 Sep 2017 15:27:28 -0500 Subject: mesa-17.2.1-3.parabola1: updating version --- ...t-do-not-crash-on-NULL-strings-returned-by-getenv.patch | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 libre/mesa/swr-rast-do-not-crash-on-NULL-strings-returned-by-getenv.patch (limited to 'libre/mesa/swr-rast-do-not-crash-on-NULL-strings-returned-by-getenv.patch') diff --git a/libre/mesa/swr-rast-do-not-crash-on-NULL-strings-returned-by-getenv.patch b/libre/mesa/swr-rast-do-not-crash-on-NULL-strings-returned-by-getenv.patch new file mode 100644 index 000000000..b9e81f9a3 --- /dev/null +++ b/libre/mesa/swr-rast-do-not-crash-on-NULL-strings-returned-by-getenv.patch @@ -0,0 +1,14 @@ +diff --git a/src/gallium/drivers/swr/rasterizer/core/utils.h b/src/gallium/drivers/swr/rasterizer/core/utils.h +index b096d2120cb..3c849e82d3b 100644 +--- a/src/gallium/drivers/swr/rasterizer/core/utils.h ++++ b/src/gallium/drivers/swr/rasterizer/core/utils.h +@@ -365,7 +365,8 @@ static INLINE std::string GetEnv(const std::string& variableName) + output.resize(valueSize - 1); // valueSize includes null, output.resize() does not + GetEnvironmentVariableA(variableName.c_str(), &output[0], valueSize); + #else +- output = getenv(variableName.c_str()); ++ char *o = getenv(variableName.c_str()); ++ output = o ? std::string(o) : std::string(); + #endif + + return output; -- cgit v1.2.3