mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-09 13:29:59 -05:00
core, pulse, modules: Fix undefined behavior with array subscript of invalid type
From the NetBSD manual:
The first argument of these functions is of type int, but only a very
restricted subset of values are actually valid. The argument must either
be the value of the macro EOF (which has a negative value), or must be a
non-negative value within the range representable as unsigned char.
Passing invalid values leads to undefined behavior.
-- ctype(3)
This commit is contained in:
parent
9dd77827ad
commit
93cccdee8d
5 changed files with 15 additions and 15 deletions
|
|
@ -53,7 +53,7 @@ pa_void_func_t pa_load_sym(lt_dlhandle handle, const char *module, const char *s
|
|||
sn = pa_sprintf_malloc("%s_LTX_%s", module, symbol);
|
||||
|
||||
for (c = sn; *c; c++)
|
||||
if (!isalnum(*c))
|
||||
if (!isalnum((unsigned char)*c))
|
||||
*c = '_';
|
||||
|
||||
f = (pa_void_func_t) lt_dlsym(handle, sn);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue