After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 773720 - directsoundsrc: incorrect cast of WinAPI function argument
directsoundsrc: incorrect cast of WinAPI function argument
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
unspecified
Other Windows
: Normal major
: 1.10.0
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2016-10-31 13:28 UTC by Artem Martynovich
Modified: 2016-10-31 14:08 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Cast first arg of mixerGetDevCaps to UINT_PTR (850 bytes, patch)
2016-10-31 13:28 UTC, Artem Martynovich
committed Details | Review

Description Artem Martynovich 2016-10-31 13:28:27 UTC
Created attachment 338830 [details] [review]
Cast first arg of mixerGetDevCaps to UINT_PTR

gst_directsound_src_mixer_find calls mixerGetDevCaps casting first parameter to uint by using GPOINTER_TO_UINT. But the first parameter of mixerGetDevCaps is actually UINT_PTR (see MSDN), which is 8 bytes long on 64-bit platform.
Such invalid usage causes read access violation inside of winmm.dll.

Attached a patch which casts the first argument to UINT_PTR.
Comment 1 Sebastian Dröge (slomo) 2016-10-31 14:07:40 UTC
commit bd2fcc957110e2954e1311c7db584be5c5b74b23
Author: Artem Martynovich <artem.martynovich@gmail.com>
Date:   Mon Oct 31 19:26:31 2016 +0600

    directsoundsrc: Correctly cast mixer to uintptr
    
    https://bugzilla.gnome.org/show_bug.cgi?id=773720