mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-05 13:29:57 -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
|
|
@ -1442,7 +1442,7 @@ static bool contains_space(const char *string) {
|
|||
pa_assert(string);
|
||||
|
||||
for (p = string; *p; ++p) {
|
||||
if (isspace(*p))
|
||||
if (isspace((unsigned char)*p))
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue