diff --git a/usr.bin/ftp/fetch.c b/usr.bin/ftp/fetch.c index 44419f91c056..274feaace448 100644 --- a/usr.bin/ftp/fetch.c +++ b/usr.bin/ftp/fetch.c @@ -1,4 +1,4 @@ -/* $NetBSD: fetch.c,v 1.151 2004/07/21 00:09:14 lukem Exp $ */ +/* $NetBSD: fetch.c,v 1.152 2004/08/08 13:52:04 lukem Exp $ */ /*- * Copyright (c) 1997-2004 The NetBSD Foundation, Inc. @@ -41,7 +41,7 @@ #include #ifndef lint -__RCSID("$NetBSD: fetch.c,v 1.151 2004/07/21 00:09:14 lukem Exp $"); +__RCSID("$NetBSD: fetch.c,v 1.152 2004/08/08 13:52:04 lukem Exp $"); #endif /* not lint */ /* @@ -187,7 +187,8 @@ auth_url(const char *challenge, char **response, const char *guser, *response = (char *)xmalloc(rlen); (void)strlcpy(*response, scheme, rlen); len = strlcat(*response, " ", rlen); - base64_encode(clear, clen, (u_char *)*response + len); + /* use `clen - 1' to not encode the trailing NUL */ + base64_encode(clear, clen - 1, (u_char *)*response + len); memset(clear, 0, clen); rval = 0; diff --git a/usr.bin/ftp/version.h b/usr.bin/ftp/version.h index cbf8f2121b42..dd9b2240fc76 100644 --- a/usr.bin/ftp/version.h +++ b/usr.bin/ftp/version.h @@ -1,4 +1,4 @@ -/* $NetBSD: version.h,v 1.40 2004/07/21 00:09:15 lukem Exp $ */ +/* $NetBSD: version.h,v 1.41 2004/08/08 13:52:04 lukem Exp $ */ /*- * Copyright (c) 1999-2004 The NetBSD Foundation, Inc. * All rights reserved. @@ -40,5 +40,5 @@ #endif #ifndef FTP_VERSION -#define FTP_VERSION "20040721" +#define FTP_VERSION "20040808" #endif