25 lines
784 B
Plaintext
25 lines
784 B
Plaintext
$OpenBSD: patch-etc_papd_auth_c,v 1.2 2007/10/25 18:57:32 steven Exp $
|
|
--- etc/papd/auth.c.orig Fri Mar 11 16:36:59 2005
|
|
+++ etc/papd/auth.c Thu Oct 25 20:30:06 2007
|
|
@@ -96,7 +96,7 @@ int auth_register(const int type, struct uam_obj *uam)
|
|
/* load all of the modules */
|
|
int auth_load(const char *path, const char *list)
|
|
{
|
|
- char name[MAXPATHLEN + 1], buf[MAXPATHLEN + 1], *p;
|
|
+ char name[MAXPATHLEN], buf[MAXPATHLEN], *p;
|
|
struct uam_mod *mod;
|
|
struct stat st;
|
|
int len;
|
|
@@ -108,9 +108,9 @@ int auth_load(const char *path, const char *list)
|
|
if ((p = strtok(buf, ",")) == NULL)
|
|
return -1;
|
|
|
|
- strcpy(name, path);
|
|
+ strlcpy(name, path, sizeof(name));
|
|
if (name[len - 1] != '/') {
|
|
- strcat(name, "/");
|
|
+ strlcat(name, "/", sizeof(name));
|
|
len++;
|
|
}
|
|
|