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
9df95217
...
9df95217e34ae81416788997d931f45f29df1f45
authored
2003-01-03 10:46:12 +0000
by
Wojciech Polak
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Don't use `static char buffer[512]' in pop3d_readline.
1 parent
945833ab
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
16 additions
and
15 deletions
pop3d/extra.c
pop3d/pop3d.c
pop3d/pop3d.h
pop3d/user.c
pop3d/extra.c
View file @
9df9521
/* GNU Mailutils -- a suite of utilities for electronic mail
Copyright (C) 1999, 2001, 2002 Free Software Foundation, Inc.
Copyright (C) 1999, 2001, 2002
, 2003
Free Software Foundation, Inc.
GNU Mailutils is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
...
...
@@ -13,7 +13,7 @@
You should have received a copy of the GNU General Public License
along with GNU Mailutils; if not, write to the Free Software
Foundation, Inc.,
675 Mass Ave, Cambridge, MA 02139, USA.
*/
Foundation, Inc.,
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "pop3d.h"
...
...
@@ -151,17 +151,16 @@ pop3d_outf (const char *fmt, ...)
/* Gets a line of input from the client, caller should free() */
char
*
pop3d_readline
(
FILE
*
fp
)
pop3d_readline
(
char
*
buffer
,
int
size
)
{
static
char
buffer
[
512
];
char
*
ptr
;
alarm
(
daemon_param
.
timeout
);
ptr
=
fgets
(
buffer
,
size
of
(
buffer
),
fp
);
ptr
=
fgets
(
buffer
,
size
,
ifile
);
alarm
(
0
);
/* We should probably check ferror() too, but if ptr is null we
are done anyway; if (!ptr && ferror(
fp
)) */
are done anyway; if (!ptr && ferror(
ifile
)) */
if
(
!
ptr
)
pop3d_abquit
(
ERR_NO_OFILE
);
...
...
pop3d/pop3d.c
View file @
9df9521
/* GNU Mailutils -- a suite of utilities for electronic mail
Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
Copyright (C) 1999, 2000, 2001, 2002
, 2003
Free Software Foundation, Inc.
GNU Mailutils is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
...
...
@@ -13,7 +13,7 @@
You should have received a copy of the GNU General Public License
along with GNU Mailutils; if not, write to the Free Software
Foundation, Inc.,
675 Mass Ave, Cambridge, MA 02139, USA.
*/
Foundation, Inc.,
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "pop3d.h"
...
...
@@ -201,6 +201,7 @@ static int
pop3d_mainloop
(
int
infile
,
int
outfile
)
{
int
status
=
OK
;
char
buffer
[
512
];
/* Reset hup to exit. */
signal
(
SIGHUP
,
pop3d_signal
);
...
...
@@ -269,7 +270,7 @@ pop3d_mainloop (int infile, int outfile)
fflush
(
ofile
);
status
=
OK
;
buf
=
pop3d_readline
(
ifile
);
buf
=
pop3d_readline
(
buffer
,
sizeof
(
buffer
)
);
cmd
=
pop3d_cmd
(
buf
);
arg
=
pop3d_args
(
buf
);
...
...
pop3d/pop3d.h
View file @
9df9521
/* GNU Mailutils -- a suite of utilities for electronic mail
Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
Copyright (C) 1999, 2000, 2001, 2002
, 2003
Free Software Foundation, Inc.
GNU Mailutils is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
...
...
@@ -13,7 +13,7 @@
You should have received a copy of the GNU General Public License
along with GNU Mailutils; if not, write to the Free Software
Foundation, Inc.,
675 Mass Ave, Cambridge, MA 02139, USA.
*/
Foundation, Inc.,
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef _POP3D_H
#define _POP3D_H 1
...
...
@@ -189,7 +189,7 @@ extern int pop3d_list __P ((const char *));
extern
int
pop3d_lock
__P
((
void
));
extern
int
pop3d_noop
__P
((
const
char
*
));
extern
int
pop3d_quit
__P
((
const
char
*
));
extern
char
*
pop3d_readline
__P
((
FILE
*
));
extern
char
*
pop3d_readline
__P
((
char
*
,
int
));
extern
int
pop3d_retr
__P
((
const
char
*
));
extern
int
pop3d_rset
__P
((
const
char
*
));
extern
RETSIGTYPE
pop3d_sigchld
__P
((
int
));
...
...
pop3d/user.c
View file @
9df9521
/* GNU Mailutils -- a suite of utilities for electronic mail
Copyright (C) 1999, 2001, 2002 Free Software Foundation, Inc.
Copyright (C) 1999, 2001, 2002
, 2003
Free Software Foundation, Inc.
GNU Mailutils is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
...
...
@@ -13,7 +13,7 @@
You should have received a copy of the GNU General Public License
along with GNU Mailutils; if not, write to the Free Software
Foundation, Inc.,
675 Mass Ave, Cambridge, MA 02139, USA.
*/
Foundation, Inc.,
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "pop3d.h"
...
...
@@ -21,6 +21,7 @@ int
pop3d_user
(
const
char
*
arg
)
{
char
*
buf
,
pass
[
POP_MAXCMDLEN
],
*
tmp
,
*
cmd
;
char
buffer
[
512
];
int
status
;
int
lockit
=
1
;
struct
mu_auth_data
*
auth_data
;
...
...
@@ -34,7 +35,7 @@ pop3d_user (const char *arg)
pop3d_outf
(
"+OK
\r\n
"
);
fflush
(
ofile
);
buf
=
pop3d_readline
(
ifile
);
buf
=
pop3d_readline
(
buffer
,
sizeof
(
buffer
)
);
cmd
=
pop3d_cmd
(
buf
);
tmp
=
pop3d_args
(
buf
);
...
...
Please
register
or
sign in
to post a comment