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
f4b595c0
Commit
f4b595c0
authored
Apr 15, 2022
by
Rob Swindell
💬
Browse files
Truncate node.dab to correct size when initializing any sbbs_t instance
Fixes issue
#395
parent
07503ac3
Pipeline
#2990
passed with stage
in 9 minutes and 45 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
0 deletions
+2
-0
src/sbbs3/main.cpp
src/sbbs3/main.cpp
+2
-0
No files found.
src/sbbs3/main.cpp
View file @
f4b595c0
...
...
@@ -3546,6 +3546,8 @@ bool sbbs_t::init()
break
;
}
}
if
(
chsize
(
nodefile
,
(
off_t
)(
cfg
.
sys_nodes
*
sizeof
(
node_t
)))
!=
0
)
errormsg
(
WHERE
,
ERR_LEN
,
str
,
cfg
.
sys_nodes
*
sizeof
(
node_t
));
for
(
i
=
0
;
cfg
.
node_num
>
0
&&
i
<
LOOP_NODEDAB
;
i
++
)
{
if
(
lock
(
nodefile
,(
cfg
.
node_num
-
1
)
*
sizeof
(
node_t
),
sizeof
(
node_t
))
==
0
)
{
unlock
(
nodefile
,(
cfg
.
node_num
-
1
)
*
sizeof
(
node_t
),
sizeof
(
node_t
));
...
...
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