Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Synchronet
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Main
Synchronet
Commits
a78171a5
Commit
a78171a5
authored
22 years ago
by
rswindell
Browse files
Options
Downloads
Patches
Plain Diff
Fixed potential bounds problem in spamlog() with extremely long "to" string.
parent
2d5b324e
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/sbbs3/logfile.cpp
+5
-5
5 additions, 5 deletions
src/sbbs3/logfile.cpp
with
5 additions
and
5 deletions
src/sbbs3/logfile.cpp
+
5
−
5
View file @
a78171a5
...
...
@@ -39,7 +39,7 @@
extern
"C"
BOOL
DLLCALL
hacklog
(
scfg_t
*
cfg
,
char
*
prot
,
char
*
user
,
char
*
text
,
char
*
host
,
SOCKADDR_IN
*
addr
)
{
char
hdr
[
512
];
char
hdr
[
1024
];
char
tstr
[
64
];
char
fname
[
MAX_PATH
+
1
];
int
file
;
...
...
@@ -71,8 +71,8 @@ extern "C" BOOL DLLCALL spamlog(scfg_t* cfg, char* prot, char* action
,
char
*
reason
,
char
*
host
,
char
*
ip_addr
,
char
*
to
,
char
*
from
)
{
char
hdr
[
512
];
char
to_user
[
128
];
char
hdr
[
1024
];
char
to_user
[
256
];
char
tstr
[
64
];
char
fname
[
MAX_PATH
+
1
];
int
file
;
...
...
@@ -86,12 +86,12 @@ extern "C" BOOL DLLCALL spamlog(scfg_t* cfg, char* prot, char* action
if
(
to
==
NULL
)
to_user
[
0
]
=
0
;
else
sprintf
(
to_user
,
"to: %s"
,
to
);
sprintf
(
to_user
,
"to: %
.128
s"
,
to
);
if
(
from
==
NULL
)
from
=
host
;
sprintf
(
hdr
,
"SUSPECTED %s SPAM %s on %.24s
\r\n
Host: %s [%s]
\r\n
From: %s %s
\r\n
Reason: "
sprintf
(
hdr
,
"SUSPECTED %s SPAM %s on %.24s
\r\n
Host: %s [%s]
\r\n
From: %
.128
s %s
\r\n
Reason: "
,
prot
,
action
,
timestr
(
cfg
,
&
now
,
tstr
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment