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
3ab210cb
Commit
3ab210cb
authored
Mar 03, 2022
by
Rob Swindell
💬
Browse files
Fix a few issues around single-file add argument parsing
Triggered by CID 33630: Unbounded source buffer
parent
4d4059e1
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
src/sbbs3/addfiles.c
src/sbbs3/addfiles.c
+6
-6
No files found.
src/sbbs3/addfiles.c
View file @
3ab210cb
...
...
@@ -729,13 +729,13 @@ int main(int argc, char **argv)
SAFECOPY
(
fdesc
,
"no description given"
);
}
sprintf
(
str
,
"%s%s"
,
scfg
.
dir
[
dirnum
]
->
path
,
fname
);
SAFEPRINTF2
(
str
,
"%s%s"
,
scfg
.
dir
[
dirnum
]
->
path
,
fname
);
if
(
mode
&
FILE_DATE
)
sprintf
(
fdesc
,
"%s "
,
unixtodstr
(
&
scfg
,(
time32_t
)
fdate
(
str
),
tmp
));
if
(
mode
&
TODAYS_DATE
)
sprintf
(
fdesc
,
"%s "
,
unixtodstr
(
&
scfg
,
time32
(
NULL
),
tmp
));
sprintf
(
tmp
,
"%.*s"
,
(
int
)(
LEN_FDESC
-
strlen
(
fdesc
)),
argv
[
++
j
])
;
SAFEC
OPY
(
fdesc
,
tmp
);
SAFEPRINTF
(
fdesc
,
"%s "
,
unixtodstr
(
&
scfg
,(
time32_t
)
fdate
(
str
),
tmp
));
else
if
(
mode
&
TODAYS_DATE
)
SAFEPRINTF
(
fdesc
,
"%s "
,
unixtodstr
(
&
scfg
,
time32
(
NULL
),
tmp
));
j
++
;
SAFEC
AT
(
fdesc
,
argv
[
j
]
);
l
=
(
long
)
flength
(
str
);
if
(
l
==-
1
)
{
printf
(
"%s not found.
\n
"
,
str
);
...
...
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