pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/news/nntpclnt/patches Add forgotten patch in previous ...
details: https://anonhg.NetBSD.org/pkgsrc/rev/8ed1a988166a
branches: trunk
changeset: 472307:8ed1a988166a
user: cube <cube%pkgsrc.org@localhost>
date: Thu Apr 08 12:32:55 2004 +0000
description:
Add forgotten patch in previous commit. Noticed by Gary Duzan. D'oh.
diffstat:
news/nntpclnt/patches/patch-ac | 83 ++++++++++++++++++++++++++++++++++++++++++
1 files changed, 83 insertions(+), 0 deletions(-)
diffs (87 lines):
diff -r 19853ae4fe5e -r 8ed1a988166a news/nntpclnt/patches/patch-ac
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/news/nntpclnt/patches/patch-ac Thu Apr 08 12:32:55 2004 +0000
@@ -0,0 +1,83 @@
+$NetBSD: patch-ac,v 1.1 2004/04/08 12:32:55 cube Exp $
+
+--- postauth.c.orig 1994-08-11 23:37:52.000000000 +0200
++++ postauth.c
+@@ -31,7 +31,7 @@ char *response;
+ {
+ char authtype[NNTP_STRLEN];
+ int i, rcode;
+- if((i = sscanf(response,"%d %s", rcode, authtype)) != 2)
++ if((i = sscanf(response,"%d %511s", &rcode, authtype)) != 2) /* 511 == NNTP_STRLEN-1 */
+ return(-1);
+ #ifdef AUTHSIMPLE
+ if (!strcasecmp(authtype,"SIMPLE"))
+@@ -54,7 +54,7 @@ int
+ authsimple(host)
+ char * host;
+ {
+- char remote[256], user[16], pass[16];
++ char remote[256], user[256], pass[256];
+ char buf[BUFSIZ];
+ int i;
+
+@@ -69,7 +69,7 @@ char * host;
+ if (buf[0] == '#')
+ continue;
+
+- i = sscanf(buf,"%s %s %s", remote, user, pass);
++ i = sscanf(buf,"%255s %255s %255s", remote, user, pass);
+ /* malformed entry? */
+ if (i != 3)
+ {
+@@ -87,14 +87,14 @@ char * host;
+ return(-1);
+ }
+
+- sprintf(buf,"authinfo simple");
++ snprintf(buf,BUFSIZ,"authinfo simple");
+ if (converse(buf, sizeof(buf)) != CONT_AUTH)
+ {
+ fprintf(stderr,"%s\n", buf);
+ return(-1);
+ }
+
+- sprintf(buf,"%s %s", user,pass);
++ snprintf(buf,BUFSIZ,"%s %s", user,pass);
+ if (converse(buf, sizeof(buf)) != OK_AUTH)
+ {
+ fprintf(stderr,"%s\n", buf);
+@@ -110,7 +110,7 @@ extern FILE *passfile;
+ authold(host)
+ char *host;
+ {
+- char remote[64], user[16], pass[16];
++ char remote[256], user[256], pass[256];
+ char buf[1024];
+ int i;
+
+@@ -124,7 +124,7 @@ char *host;
+ {
+ if (buf[0] == '#')
+ continue;
+- i = sscanf(buf,"%s %s %s", remote, user, pass);
++ i = sscanf(buf,"%255s %255s %255s", remote, user, pass);
+ /* malformed entry? */
+ if (i != 3)
+ {
+@@ -141,14 +141,14 @@ char *host;
+ return(-1);
+ }
+
+- sprintf(buf,"authinfo user %s", user);
++ snprintf(buf,sizeof(buf),"authinfo user %s", user);
+ if (converse(buf, sizeof(buf)) != CONT_OLDAUTHD)
+ {
+ fprintf(stderr,"%s\n", buf);
+ return(-1);
+ }
+
+- sprintf(buf,"authinfo pass %s", pass);
++ snprintf(buf,sizeof(buf),"authinfo pass %s", pass);
+ if (converse(buf, sizeof(buf)) != OK_OLDAUTH)
+ {
+ fprintf(stderr,"%s\n", buf);
Home |
Main Index |
Thread Index |
Old Index