Bug 38560 - PATCH: audio/gmixer uses uninitialized pointers
Summary: PATCH: audio/gmixer uses uninitialized pointers
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: cpiazza
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-05-26 06:40 UTC by Juha Ylitalo
Modified: 2003-01-18 16:08 UTC (History)
0 users

See Also:


Attachments
patch-ac (1023 bytes, text/plain)
2002-05-26 06:40 UTC, Juha Ylitalo
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Juha Ylitalo 2002-05-26 06:40:01 UTC
When I tried to run gmixer-0.98c, it kept on dying on segmentation fault.
gdb revealed that it died on line 295 in gmixer.c, when variable i had
value 20.
Quick search revealed that volctrls array is only initialized for the
first 17 devices, various array buffers were allocated to SOUND_MIXER_NRDEVICES
and around that line 295, that SOUND_MIXER_NRDEVICES was also used as upper
limit in for loop.
This turned out to be problem, because in my machine that variable seems
to have value 25, so when the loop was trying to go indexes from 18 to 24,
all varialbes were uninitialized.

Fix: This patch tries to fix current and future needs, until we reach point
where SOUND_MIXER_NRDEVICES goes above 100, but even then it tries to 
handle case without crashing.
Comment 1 Ying-Chieh Liao freebsd_committer 2002-05-26 14:54:37 UTC
Responsible Changed
From-To: freebsd-ports->cpiazza

over to maintainer
Comment 2 Tilman Keskinoz freebsd_committer 2003-01-18 16:08:31 UTC
State Changed
From-To: open->closed

Committed, thanks