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
da406c0a
Commit
da406c0a
authored
Mar 13, 2022
by
Rob Swindell
💬
Browse files
Fix CID 33235: Argument cannot be negative
parent
300cc8fc
Pipeline
#2881
passed with stage
in 14 minutes
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
src/sbbs3/writemsg.cpp
src/sbbs3/writemsg.cpp
+1
-1
No files found.
src/sbbs3/writemsg.cpp
View file @
da406c0a
...
...
@@ -1278,7 +1278,7 @@ bool sbbs_t::editfile(char *fname, bool msg)
}
if
((
file
=
nopen
(
fname
,
O_RDONLY
))
!=-
1
)
{
length
=
(
long
)
filelength
(
file
);
if
(
length
>
(
long
)
maxlines
*
MAX_LINE_LEN
)
{
if
(
length
<
0
||
length
>
(
long
)
maxlines
*
MAX_LINE_LEN
)
{
close
(
file
);
free
(
buf
);
attr
(
cfg
.
color
[
clr_err
]);
...
...
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