WarmUpTill / SceneSwitcher

An automation tool for OBS Studio
https://obsproject.com/forum/resources/automatic-scene-switching.395/
GNU General Public License v2.0
984 stars 78 forks source link

Missing -D_FORTIFY_SOURCE=2 #304

Closed eribertomota closed 3 years ago

eribertomota commented 3 years ago

Dear @WarmUpTill,

debhelper (the Debian packaging system) try to apply all hardening options when building with GCC/G++. blhc is a tool to show if are missing options. This tool acts over the final build log. In obs-advanced-scene-switcher package, I can see:

# blhc --all --debian obs-advanced-scene-switcher_1.15.3+git20210913.25cf51a-1_amd64.build
CPPFLAGS missing (-D_FORTIFY_SOURCE=2): /usr/bin/c++ -dM -E -c /usr/share/cmake-3.18/Modules CMakeCXXCompilerABI.cpp -DASIO_STANDALONE -DHAVE_OBSCONFIG_H -DQT_CORE_LIB -DQT_GUI_LIB -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DREPLAYBUFFER_SUPPORTED -DVCAM_SUPPORTED -Dadvanced_scene_switcher_EXPORTS -I/PKGS/OBS/obs-advanced-scene-switcher-2/obs-advanced-scene-switcher-1.15.3+git20210913.25cf51a/obj-x86_64-linux-gnu -I/PKGS/OBS/obs-advanced-scene-switcher-2/obs-advanced-scene-switcher-1.15.3+git20210913.25cf51a -I/PKGS/OBS/obs-advanced-scene-switcher-2/obs-advanced-scene-switcher-1.15.3+git20210913.25cf51a/deps/asio/asio/include -I/PKGS/OBS/obs-advanced-scene-switcher-2/obs-advanced-scene-switcher-1.15.3+git20210913.25cf51a/deps/websocketpp -I/usr/include/obs -I/usr/include/x86_64-linux-gnu/qt5 -I/usr/include/x86_64-linux-gnu/qt5/QtCore -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -I/usr/include/x86_64-linux-gnu/qt5/QtWidgets -I/usr/include/x86_64-linux-gnu/qt5/QtGui -I/usr/include/x86_64-linux-gnu -I/usr/include -I/usr/include/c++/11 -I/usr/include/x86_64-linux-gnu/c++/11 -I/usr/include/c++/11/backward -I/usr/lib/gcc/x86_64-linux-gnu/11/include -I/usr/local/include

The build log is the same sent in #303.

Please, let me know if this is a false positive. If not, let me know if you think to fix it.

Thanks in advance.

Regards,

Eriberto

eribertomota commented 3 years ago

Complementing, it is not urgent.

WarmUpTill commented 3 years ago

As I am not setting it explicitly I don't think it is a false positive. I will heave to read up on what it does exactly before adding it. But as I don't believe the plugin is used in any security relevant setting, I agree that this is probably not urgent.

eribertomota commented 3 years ago

I am closing this issue because the line produced by blhc is a false positive. This line is a check for compiler flags and the resulting objects never end up in any artifacts from the build. This action is recurrent in CMake. In this case, I can ask for the blhc to ignore this line via debian/rules.

Reference: https://gitlab.kitware.com/cmake/cmake/-/issues/20631#note_746828

Thank you!

WarmUpTill commented 3 years ago

Thank you very much for looking into this! :)