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
8118291d
Commit
8118291d
authored
Mar 03, 2022
by
Rob Swindell
💬
Browse files
Check return value of filelength()
Fix CID 33266: Negative loop bound
parent
ac6313df
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
src/sbbs3/useredit.cpp
src/sbbs3/useredit.cpp
+4
-0
No files found.
src/sbbs3/useredit.cpp
View file @
8118291d
...
...
@@ -686,6 +686,10 @@ int sbbs_t::searchup(char *search,int usernum)
return
(
usernum
);
flen
=
(
long
)
filelength
(
file
);
if
(
flen
<
0
)
{
close
(
file
);
return
usernum
;
}
lseek
(
file
,(
long
)((
long
)
usernum
*
U_LEN
),
0
);
while
((
i
*
U_LEN
)
<=
(
ulong
)
flen
)
{
...
...
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