Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
David MacDonald
purr-data
Commits
9b981acc
Commit
9b981acc
authored
Aug 11, 2017
by
Jonathan Wilkes
Browse files
fix more invalid reads
parent
2316e4cb
Changes
2
Hide whitespace changes
Inline
Side-by-side
externals/ggee/filters/hlshelf.c
View file @
9b981acc
...
...
@@ -177,15 +177,17 @@ void hlshelf_float(t_hlshelf *x,t_floatarg f)
static
void
*
hlshelf_new
(
t_symbol
*
s
,
t_int
argc
,
t_atom
*
at
)
{
t_hlshelf
*
x
=
(
t_hlshelf
*
)
pd_new
(
hlshelf_class
);
t_float
k0
=
atom_getfloat
(
at
);
t_float
k1
=
atom_getfloat
(
at
+
1
);
t_float
k2
=
atom_getfloat
(
at
+
2
);
t_float
f1
=
atom_getfloat
(
at
+
3
);
t_float
f2
=
atom_getfloat
(
at
+
4
);
f1
=
atom_getfloat
(
at
);
f2
=
atom_getfloat
(
at
);
t_float
k0
=
argc
?
atom_getfloatarg
(
0
,
argc
--
,
at
++
)
:
0
;
t_float
k1
=
argc
?
atom_getfloatarg
(
0
,
argc
--
,
at
++
)
:
0
;
t_float
k2
=
argc
?
atom_getfloatarg
(
0
,
argc
--
,
at
++
)
:
0
;
t_float
f1
=
argc
?
atom_getfloatarg
(
0
,
argc
--
,
at
++
)
:
0
;
t_float
f2
=
argc
?
atom_getfloatarg
(
0
,
argc
--
,
at
++
)
:
0
;
/* For some reason f1 and f2 got set to the original value
of at[0] below. Not sure why. Anyway, I just set them to
k0 which should be functionally equivalent. */
f1
=
k0
;
f2
=
k0
;
if
((
f1
==
0
.
0
f
&&
f2
==
0
.
0
f
)
||
f1
>
f2
){
/* all gains = 0db */
f1
=
150
.
0
f
;
...
...
externals/mrpeach/str/str.c
View file @
9b981acc
...
...
@@ -35,7 +35,7 @@ static void *str_new(t_symbol *s, int argc, t_atom *argv)
void
str_setup
(
void
)
{
str_class
=
class_new
(
gensym
(
"str"
),
(
t_newmethod
)
str_new
,
0
,
sizeof
(
t_str
),
0
,
0
);
str_class
=
class_new
(
gensym
(
"str"
),
(
t_newmethod
)
str_new
,
0
,
sizeof
(
t_str
),
0
,
A_GIMME
,
0
);
}
#else //ifndef PD_BLOBS
/* Make a _real_ str object: */
...
...
@@ -687,7 +687,7 @@ static void *str_new(t_symbol *s, int argc, t_atom *argv)
x
->
x_function
=
0
;
/* default = string */
x
->
x_nsplit
=
0L
;
next
=
0
;
/* index of next argument */
if
(
argv
[
0
].
a_type
==
A_SYMBOL
)
if
(
argc
&&
argv
[
0
].
a_type
==
A_SYMBOL
)
{
/* the first argument may be a selector */
atom_string
(
&
argv
[
0
],
(
char
*
)
x
->
x_buf
.
s_data
,
MAXPDSTRING
);
for
(
i
=
0
;
i
<
n_functions
;
++
i
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment