Skip to content

Patch libpng usage to eliminate known vulnerabilities #537

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Prev Previous commit
Next Next commit
WIP: Change reference in emscripten with VS btw
  • Loading branch information
clang-clang-clang committed Mar 24, 2023
commit 1b3d2722f0a950a1cffa1d50627cc2bb58d19dda
42 changes: 20 additions & 22 deletions platform/emscripten/win32/rtt.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LinkIncremental>true</LinkIncremental>
<IncludePath>../../../external/lua-5.1.3/src;../../../librtt;../../../external/glew/Project/include;../win32/libs/SDL2;../win32/libs/glew/include;../;../win32/;../../../external/rsa;../rtt.win32;../../../plugins/shared;../../../librtt/Corona;../../../external/Box2D;../../../external/ALmixer;../../../external/openal-soft-1.12.854/include/AL;../../../external/LuaHashMap;../../../external/b2Separator-cpp;../../../external\luafilesystem\src;../../../external\opengl;../../../external/zlib123;../../../external/libpng1243b01;../../../external/libjpeg;../../shared;../../../external\smoothpolygon;$(IncludePath)</IncludePath>
<IncludePath>../../../external/lua-5.1.3/src;../../../librtt;../../../external/glew/Project/include;../win32/libs/SDL2;../win32/libs/glew/include;../;../win32/;../../../external/rsa;../rtt.win32;../../../plugins/shared;../../../librtt/Corona;../../../external/Box2D;../../../external/ALmixer;../../../external/openal-soft-1.12.854/include/AL;../../../external/LuaHashMap;../../../external/b2Separator-cpp;../../../external\luafilesystem\src;../../../external\opengl;../../../external/zlib123;../../../external/libpng;../../../external/libjpeg;../../shared;../../../external\smoothpolygon;$(IncludePath)</IncludePath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Emscripten'">
<LinkIncremental>true</LinkIncremental>
Expand Down Expand Up @@ -123,7 +123,7 @@
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>Rtt_EMSCRIPTEN_ENV;Rtt_USE_MAIN_LUA;EMSCRIPTEN;__EMSCRIPTEN__;Rtt_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>../;../../../external/lua-5.1.3/src;../../../librtt;../../../librtt/Core;../../../external/rsa;../../../plugins/shared;../../../librtt/Corona;../../../external/Box2D;../../../external/ALmixer;../../../external/openal-soft-1.12.854/include/AL;../../../external/LuaHashMap;../../../external/b2Separator-cpp;../../../external/luafilesystem\src;../../../external/opengl;../../../external/libpng1243b01;../../../external/libjpeg;../../../external/zlib123;../../shared;../../../external/smoothpolygon;$(IncludePath)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>../;../../../external/lua-5.1.3/src;../../../librtt;../../../librtt/Core;../../../external/rsa;../../../plugins/shared;../../../librtt/Corona;../../../external/Box2D;../../../external/ALmixer;../../../external/openal-soft-1.12.854/include/AL;../../../external/LuaHashMap;../../../external/b2Separator-cpp;../../../external/luafilesystem\src;../../../external/opengl;../../../external/libpng;../../../external/libjpeg;../../../external/zlib123;../../shared;../../../external/smoothpolygon;$(IncludePath)</AdditionalIncludeDirectories>
<AdditionalOptions>-s LEGACY_VM_SUPPORT=1 -s USE_SDL=2 -Wno-inconsistent-missing-override %(AdditionalOptions)</AdditionalOptions>
<DisableWarnings>
</DisableWarnings>
Expand Down Expand Up @@ -166,7 +166,7 @@
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>Rtt_EMSCRIPTEN_ENV;Rtt_USE_MAIN_LUA;EMSCRIPTEN;__EMSCRIPTEN__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>../;../../../external/lua-5.1.3/src;../../../librtt;../../../librtt/Core;../../../external/rsa;../../../plugins/shared;../../../librtt/Corona;../../../external/Box2D;../../../external/ALmixer;../../../external/openal-soft-1.12.854/include/AL;../../../external/LuaHashMap;../../../external/b2Separator-cpp;../../../external/luafilesystem\src;../../../external/opengl;../../../external/libpng1243b01;../../../external/libjpeg;../../../external/zlib123;../../shared;../../../external/smoothpolygon;$(IncludePath)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>../;../../../external/lua-5.1.3/src;../../../librtt;../../../librtt/Core;../../../external/rsa;../../../plugins/shared;../../../librtt/Corona;../../../external/Box2D;../../../external/ALmixer;../../../external/openal-soft-1.12.854/include/AL;../../../external/LuaHashMap;../../../external/b2Separator-cpp;../../../external/luafilesystem\src;../../../external/opengl;../../../external/libpng;../../../external/libjpeg;../../../external/zlib123;../../shared;../../../external/smoothpolygon;$(IncludePath)</AdditionalIncludeDirectories>
<AdditionalOptions>-s LEGACY_VM_SUPPORT=1 -s USE_SDL=2 -Wno-inconsistent-missing-override %(AdditionalOptions)</AdditionalOptions>
</ClCompile>
<Link>
Expand Down Expand Up @@ -238,8 +238,8 @@
<ClInclude Include="..\..\..\external\libjpeg\jdct.h" />
<ClInclude Include="..\..\..\external\libjpeg\jdhuff.h" />
<ClInclude Include="..\..\..\external\libjpeg\jerror.h" />
<ClInclude Include="..\..\..\external\libpng1243b01\png.h" />
<ClInclude Include="..\..\..\external\libpng1243b01\pngconf.h" />
<ClInclude Include="..\..\..\external\libpng\png.h" />
<ClInclude Include="..\..\..\external\libpng\pngconf.h" />
<ClInclude Include="..\..\..\external\lpeg\lpeg.h" />
<ClInclude Include="..\..\..\external\lua-5.1.3\src\lapi.h" />
<ClInclude Include="..\..\..\external\lua-5.1.3\src\lauxlib.h" />
Expand Down Expand Up @@ -662,23 +662,21 @@
<ClCompile Include="..\..\..\external\libjpeg\jquant1.c" />
<ClCompile Include="..\..\..\external\libjpeg\jquant2.c" />
<ClCompile Include="..\..\..\external\libjpeg\jutils.c" />
<ClCompile Include="..\..\..\external\libpng1243b01\png.c" />
<ClCompile Include="..\..\..\external\libpng1243b01\pngerror.c" />
<ClCompile Include="..\..\..\external\libpng1243b01\pnggccrd.c" />
<ClCompile Include="..\..\..\external\libpng1243b01\pngget.c" />
<ClCompile Include="..\..\..\external\libpng1243b01\pngmem.c" />
<ClCompile Include="..\..\..\external\libpng1243b01\pngpread.c" />
<ClCompile Include="..\..\..\external\libpng1243b01\pngread.c" />
<ClCompile Include="..\..\..\external\libpng1243b01\pngrio.c" />
<ClCompile Include="..\..\..\external\libpng1243b01\pngrtran.c" />
<ClCompile Include="..\..\..\external\libpng1243b01\pngrutil.c" />
<ClCompile Include="..\..\..\external\libpng1243b01\pngset.c" />
<ClCompile Include="..\..\..\external\libpng1243b01\pngtrans.c" />
<ClCompile Include="..\..\..\external\libpng1243b01\pngvcrd.c" />
<ClCompile Include="..\..\..\external\libpng1243b01\pngwio.c" />
<ClCompile Include="..\..\..\external\libpng1243b01\pngwrite.c" />
<ClCompile Include="..\..\..\external\libpng1243b01\pngwtran.c" />
<ClCompile Include="..\..\..\external\libpng1243b01\pngwutil.c" />
<ClCompile Include="..\..\..\external\libpng\png.c" />
<ClCompile Include="..\..\..\external\libpng\pngerror.c" />
<ClCompile Include="..\..\..\external\libpng\pngget.c" />
<ClCompile Include="..\..\..\external\libpng\pngmem.c" />
<ClCompile Include="..\..\..\external\libpng\pngpread.c" />
<ClCompile Include="..\..\..\external\libpng\pngread.c" />
<ClCompile Include="..\..\..\external\libpng\pngrio.c" />
<ClCompile Include="..\..\..\external\libpng\pngrtran.c" />
<ClCompile Include="..\..\..\external\libpng\pngrutil.c" />
<ClCompile Include="..\..\..\external\libpng\pngset.c" />
<ClCompile Include="..\..\..\external\libpng\pngtrans.c" />
<ClCompile Include="..\..\..\external\libpng\pngwio.c" />
<ClCompile Include="..\..\..\external\libpng\pngwrite.c" />
<ClCompile Include="..\..\..\external\libpng\pngwtran.c" />
<ClCompile Include="..\..\..\external\libpng\pngwutil.c" />
<ClCompile Include="..\..\..\external\lpeg\lpeg.c" />
<ClCompile Include="..\..\..\external\lua-5.1.3\src\lapi.c" />
<ClCompile Include="..\..\..\external\lua-5.1.3\src\lauxlib.c" />
Expand Down
40 changes: 17 additions & 23 deletions platform/emscripten/win32/rtt.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -1025,55 +1025,49 @@
<ClCompile Include="..\Rtt_EmscriptenCPluginLoader.cpp">
<Filter>emscripten</Filter>
</ClCompile>
<ClCompile Include="..\..\..\external\libpng1243b01\png.c">
<ClCompile Include="..\..\..\external\libpng\png.c">
<Filter>libpng</Filter>
</ClCompile>
<ClCompile Include="..\..\..\external\libpng1243b01\pngerror.c">
<ClCompile Include="..\..\..\external\libpng\pngerror.c">
<Filter>libpng</Filter>
</ClCompile>
<ClCompile Include="..\..\..\external\libpng1243b01\pnggccrd.c">
<ClCompile Include="..\..\..\external\libpng\pngget.c">
<Filter>libpng</Filter>
</ClCompile>
<ClCompile Include="..\..\..\external\libpng1243b01\pngget.c">
<ClCompile Include="..\..\..\external\libpng\pngmem.c">
<Filter>libpng</Filter>
</ClCompile>
<ClCompile Include="..\..\..\external\libpng1243b01\pngmem.c">
<ClCompile Include="..\..\..\external\libpng\pngpread.c">
<Filter>libpng</Filter>
</ClCompile>
<ClCompile Include="..\..\..\external\libpng1243b01\pngpread.c">
<ClCompile Include="..\..\..\external\libpng\pngread.c">
<Filter>libpng</Filter>
</ClCompile>
<ClCompile Include="..\..\..\external\libpng1243b01\pngread.c">
<ClCompile Include="..\..\..\external\libpng\pngrio.c">
<Filter>libpng</Filter>
</ClCompile>
<ClCompile Include="..\..\..\external\libpng1243b01\pngrio.c">
<ClCompile Include="..\..\..\external\libpng\pngrtran.c">
<Filter>libpng</Filter>
</ClCompile>
<ClCompile Include="..\..\..\external\libpng1243b01\pngrtran.c">
<ClCompile Include="..\..\..\external\libpng\pngrutil.c">
<Filter>libpng</Filter>
</ClCompile>
<ClCompile Include="..\..\..\external\libpng1243b01\pngrutil.c">
<ClCompile Include="..\..\..\external\libpng\pngset.c">
<Filter>libpng</Filter>
</ClCompile>
<ClCompile Include="..\..\..\external\libpng1243b01\pngset.c">
<ClCompile Include="..\..\..\external\libpng\pngtrans.c">
<Filter>libpng</Filter>
</ClCompile>
<ClCompile Include="..\..\..\external\libpng1243b01\pngtrans.c">
<ClCompile Include="..\..\..\external\libpng\pngwio.c">
<Filter>libpng</Filter>
</ClCompile>
<ClCompile Include="..\..\..\external\libpng1243b01\pngvcrd.c">
<ClCompile Include="..\..\..\external\libpng\pngwrite.c">
<Filter>libpng</Filter>
</ClCompile>
<ClCompile Include="..\..\..\external\libpng1243b01\pngwio.c">
<ClCompile Include="..\..\..\external\libpng\pngwtran.c">
<Filter>libpng</Filter>
</ClCompile>
<ClCompile Include="..\..\..\external\libpng1243b01\pngwrite.c">
<Filter>libpng</Filter>
</ClCompile>
<ClCompile Include="..\..\..\external\libpng1243b01\pngwtran.c">
<Filter>libpng</Filter>
</ClCompile>
<ClCompile Include="..\..\..\external\libpng1243b01\pngwutil.c">
<ClCompile Include="..\..\..\external\libpng\pngwutil.c">
<Filter>libpng</Filter>
</ClCompile>
<ClCompile Include="..\..\..\external\zlib123\deflate.c">
Expand Down Expand Up @@ -2746,10 +2740,10 @@
<ClInclude Include="..\Rtt_EmscriptenJSPluginLoader.h">
<Filter>emscripten</Filter>
</ClInclude>
<ClInclude Include="..\..\..\external\libpng1243b01\png.h">
<ClInclude Include="..\..\..\external\libpng\png.h">
<Filter>libpng</Filter>
</ClInclude>
<ClInclude Include="..\..\..\external\libpng1243b01\pngconf.h">
<ClInclude Include="..\..\..\external\libpng\pngconf.h">
<Filter>libpng</Filter>
</ClInclude>
<ClInclude Include="..\..\..\external\zlib123\crc32.h">
Expand Down