HCoop
/
bpt
/
emacs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Improve port of struct timespec to MS-Windows.
[bpt/emacs.git]
/
lib-src
/
pop.c
diff --git
a/lib-src/pop.c
b/lib-src/pop.c
index
ae10007
..
c4c7f2b
100644
(file)
--- a/
lib-src/pop.c
+++ b/
lib-src/pop.c
@@
-1,6
+1,6
@@
/* pop.c: client routines for talking to a POP3-protocol post-office server
/* pop.c: client routines for talking to a POP3-protocol post-office server
-Copyright (C) 1991, 1993, 1996-1997, 1999, 2001-201
1
+Copyright (C) 1991, 1993, 1996-1997, 1999, 2001-201
2
Free Software Foundation, Inc.
Author: Jonathan Kamens <jik@security.ov.com>
Free Software Foundation, Inc.
Author: Jonathan Kamens <jik@security.ov.com>
@@
-346,6
+346,7
@@
pop_stat (popserver server, int *count, int *size)
if (0 == strncmp (fromserver, "-ERR", 4))
{
strncpy (pop_error, fromserver, ERROR_MAX);
if (0 == strncmp (fromserver, "-ERR", 4))
{
strncpy (pop_error, fromserver, ERROR_MAX);
+ pop_error[ERROR_MAX-1] = '\0';
}
else
{
}
else
{
@@
-447,7
+448,10
@@
pop_list (popserver server, int message, int **IDs, int **sizes)
if (strncmp (fromserver, "+OK ", 4))
{
if (! strncmp (fromserver, "-ERR", 4))
if (strncmp (fromserver, "+OK ", 4))
{
if (! strncmp (fromserver, "-ERR", 4))
- strncpy (pop_error, fromserver, ERROR_MAX);
+ {
+ strncpy (pop_error, fromserver, ERROR_MAX);
+ pop_error[ERROR_MAX-1] = '\0';
+ }
else
{
strcpy (pop_error,
else
{
strcpy (pop_error,
@@
-687,6
+691,7
@@
pop_multi_first (popserver server, const char *command, char **response)
if (0 == strncmp (*response, "-ERR", 4))
{
strncpy (pop_error, *response, ERROR_MAX);
if (0 == strncmp (*response, "-ERR", 4))
{
strncpy (pop_error, *response, ERROR_MAX);
+ pop_error[ERROR_MAX-1] = '\0';
return (-1);
}
else if (0 == strncmp (*response, "+OK", 3))
return (-1);
}
else if (0 == strncmp (*response, "+OK", 3))
@@
-860,6
+865,7
@@
pop_last (popserver server)
if (! strncmp (fromserver, "-ERR", 4))
{
strncpy (pop_error, fromserver, ERROR_MAX);
if (! strncmp (fromserver, "-ERR", 4))
{
strncpy (pop_error, fromserver, ERROR_MAX);
+ pop_error[ERROR_MAX-1] = '\0';
return (-1);
}
else if (strncmp (fromserver, "+OK ", 4))
return (-1);
}
else if (strncmp (fromserver, "+OK ", 4))