projects
/
mmh
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
burst: Fixed handling of trailing text; removed -inplace and -quiet.
[mmh]
/
uip
/
slocal.c
diff --git
a/uip/slocal.c
b/uip/slocal.c
index
c0f0922
..
765bcbd
100644
(file)
--- a/
uip/slocal.c
+++ b/
uip/slocal.c
@@
-319,7
+319,7
@@
main(int argc, char **argv)
if (!(now = dlocaltimenow())) {
adios(NULL, "unable to ascertain local time");
}
if (!(now = dlocaltimenow())) {
adios(NULL, "unable to ascertain local time");
}
- snprintf(ddate, sizeof(ddate), "Delivery-Date: %s\n", dtimenow(0));
+ snprintf(ddate, sizeof(ddate), "Delivery-Date: %s\n", dtimenow());
/*
** Copy the message to a temporary file
/*
** Copy the message to a temporary file
@@
-1107,6
+1107,7
@@
get_sender(char *envelope, char **sender)
i = strlen("From ");
strncpy(buffer, envelope + i, sizeof(buffer));
i = strlen("From ");
strncpy(buffer, envelope + i, sizeof(buffer));
+ buffer[sizeof buffer -1] = '\0'; /* ensure termination */
if ((cp = strchr(buffer, '\n'))) {
*cp = '\0';
cp -= 24;
if ((cp = strchr(buffer, '\n'))) {
*cp = '\0';
cp -= 24;