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
cb12ed0d
Commit
cb12ed0d
authored
May 15, 2021
by
Rob Swindell
💬
Browse files
Fix use of uninitialized variable in editfilename()
CID 331582
parent
9706a821
Pipeline
#2206
passed with stage
in 8 minutes and 25 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
3 deletions
+2
-3
src/sbbs3/file.cpp
src/sbbs3/file.cpp
+2
-3
No files found.
src/sbbs3/file.cpp
View file @
cb12ed0d
...
...
@@ -279,7 +279,6 @@ bool sbbs_t::editfilename(file_t* f)
char
str
[
MAX_FILENAME_LEN
+
1
];
char
tmp
[
MAX_PATH
+
1
];
char
path
[
MAX_PATH
+
1
];
char
dirpath
[
MAX_PATH
+
1
];
bputs
(
text
[
EditFilename
]);
SAFECOPY
(
str
,
f
->
name
);
...
...
@@ -294,8 +293,8 @@ bool sbbs_t::editfilename(file_t* f)
bprintf
(
text
[
FileAlreadyThere
],
path
);
return
false
;
}
SAFEPRINTF2
(
path
,
"%s%s"
,
dir
path
,
f
->
name
);
SAFEPRINTF2
(
tmp
,
"%s%s"
,
dir
path
,
str
);
SAFEPRINTF2
(
path
,
"%s%s"
,
cfg
.
dir
[
f
->
dir
]
->
path
,
f
->
name
);
SAFEPRINTF2
(
tmp
,
"%s%s"
,
cfg
.
dir
[
f
->
dir
]
->
path
,
str
);
if
(
fexistcase
(
path
)
&&
rename
(
path
,
tmp
)
!=
0
)
{
bprintf
(
text
[
CouldntRenameFile
],
path
,
tmp
);
return
false
;
...
...
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