Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
John McEleney
/
mailutils
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
Commit
50599f21
...
50599f21fa687557e55a8bdf744e6a772de2f200
authored
2000-07-04 03:41:50 +0000
by
Alain Magloire
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
message.c
sigh buffer overflow in message_from
1 parent
970f96cd
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
mailbox/message.c
mailbox/message.c
View file @
50599f2
...
...
@@ -249,7 +249,7 @@ message_from (message_t msg, char *buf, size_t len, size_t *pnwrite)
if
(
buf
&&
len
>
0
)
{
memcpy
(
buf
,
addr
,
n
);
buf
[
n
-
1
]
=
'\0'
;
buf
[
n
]
=
'\0'
;
}
free
(
addr
);
free
(
from
);
...
...
@@ -264,7 +264,7 @@ message_from (message_t msg, char *buf, size_t len, size_t *pnwrite)
if
(
buf
&&
len
>
0
)
{
memcpy
(
buf
,
"unknown"
,
n
);
buf
[
n
-
1
]
=
'\0'
;
buf
[
n
]
=
'\0'
;
}
if
(
pnwrite
)
...
...
@@ -311,7 +311,7 @@ message_received (message_t msg, char *buf, size_t len, size_t *pnwrite)
}
n
=
(
n
>
len
)
?
len
:
n
;
strncpy
(
buf
,
ctime
(
&
t
),
n
);
buf
[
n
-
1
]
=
'\0'
;
buf
[
n
]
=
'\0'
;
if
(
pnwrite
)
*
pnwrite
=
n
;
return
0
;
...
...
Please
register
or
sign in
to post a comment