[vlc-commits] [Git][videolan/vlc][master] plugins: fix prefs crash from null option shorttext in mock/test options

Steve Lhomme (@robUx4) gitlab at videolan.org
Tue Feb 8 07:11:13 UTC 2022



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
dd53be28 by Lyndon Brown at 2022-02-08T06:54:18+00:00
plugins: fix prefs crash from null option shorttext in mock/test options

These options have null shorttext labels because they are not meant to show
up in GUI preferences. They were not configured in any way to be hidden
from GUI prefs though. Being available in GUI prefs yet having a null
shorttext pointer breaks the expectations of the GUI prefs code resulting
in a null-deref crash.

(The crash occurs upon simply selecting these plugin nodes within the
advanced preferences tree, or upon opening the new upcoming 'expert'
preferences interface).

The most appropriate solution is to mark these developer options as
private. Since there is actually no need for these options to be saved in
the saved settings file, I have marked them as volatile, which also implies
private.

- - - - -


2 changed files:

- modules/codec/hxxx_helper_testdec.c
- modules/video_output/opengl/filter_mock.c


Changes:

=====================================
modules/codec/hxxx_helper_testdec.c
=====================================
@@ -154,5 +154,6 @@ vlc_module_begin()
     add_shortcut("hxxxhelper")
     set_capability("video decoder", 0)
     add_bool("hxxx-helper-testdec-xvcC", false, NULL, NULL)
+        change_volatile()
     set_callbacks(OpenDecoder, CloseDecoder)
 vlc_module_end()


=====================================
modules/video_output/opengl/filter_mock.c
=====================================
@@ -619,8 +619,13 @@ vlc_module_begin()
     set_callback_opengl_filter(Open)
     add_shortcut("mock");
     add_float(MOCK_CFG_PREFIX "angle", 0.f, NULL, NULL) /* in degrees */
+        change_volatile()
     add_float(MOCK_CFG_PREFIX "speed", 0.f, NULL, NULL) /* in rotations per minute */
+        change_volatile()
     add_bool(MOCK_CFG_PREFIX "mask", false, NULL, NULL)
+        change_volatile()
     add_bool(MOCK_CFG_PREFIX "plane", false, NULL, NULL)
-    add_integer(MOCK_CFG_PREFIX "msaa", 4, NULL, NULL);
+        change_volatile()
+    add_integer(MOCK_CFG_PREFIX "msaa", 4, NULL, NULL)
+        change_volatile()
 vlc_module_end()



View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/dd53be283d9b1140ad9af1751fc675fe1f4d7f1f

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/dd53be283d9b1140ad9af1751fc675fe1f4d7f1f
You're receiving this email because of your account on code.videolan.org.




More information about the vlc-commits mailing list