Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Main
Synchronet
Commits
bf1cae28
Commit
bf1cae28
authored
Apr 30, 2022
by
Rob Swindell
💬
Browse files
Fix CID 174496: Integer handling issues (BAD_SHIFT)
Don't repeat call atoi() unnecessarily.
parent
f0b0e4ef
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
src/sbbs3/scfg/scfgxtrn.c
src/sbbs3/scfg/scfgxtrn.c
+3
-2
No files found.
src/sbbs3/scfg/scfgxtrn.c
View file @
bf1cae28
...
...
@@ -666,8 +666,9 @@ void tevents_cfg()
,
str
,
50
,
K_EDIT
);
cfg
.
event
[
i
]
->
months
=
0
;
for
(
p
=
str
;
*
p
;
p
++
)
{
if
(
atoi
(
p
))
{
cfg
.
event
[
i
]
->
months
|=
(
1
<<
(
atoi
(
p
)
-
1
));
int
num
=
atoi
(
p
);
if
(
num
>
0
)
{
cfg
.
event
[
i
]
->
months
|=
(
1
<<
(
num
-
1
));
while
(
*
p
&&
IS_DIGIT
(
*
p
))
p
++
;
}
else
{
...
...
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