File pam_smb-2.0.0rc6-array-fix.patch of Package pam_smb
--- pamsmbd/pam_read_conf.c
+++ pamsmbd/pam_read_conf.c
@@ -56,17 +56,17 @@
cr0=strchr(pamsmb_dlist->controllers[0].domain, '\n');
if (cr0 != NULL)
*cr0 = '\0';
- pamsmb_dlist->controllers[0].domain[MAX_SERV_LEN]='\0';
+ pamsmb_dlist->controllers[0].domain[MAX_NTDOM_LEN - 1]='\0';
fgets(pamsmb_dlist->controllers[0].servers[0].sername, MAX_SERV_LEN, fl);
cr0=strchr(pamsmb_dlist->controllers[0].servers[0].sername, '\n');
if (cr0 != NULL)
*cr0 = '\0';
- pamsmb_dlist->controllers[0].servers[0].sername[MAX_SERV_LEN]='\0';
+ pamsmb_dlist->controllers[0].servers[0].sername[MAX_SERV_LEN - 1]='\0';
fgets(pamsmb_dlist->controllers[0].servers[1].sername, MAX_SERV_LEN, fl);
cr0=strchr(pamsmb_dlist->controllers[0].servers[1].sername, '\n');
if (cr0 != NULL)
*cr0 = '\0';
- pamsmb_dlist->controllers[0].servers[1].sername[MAX_SERV_LEN]='\0';
+ pamsmb_dlist->controllers[0].servers[1].sername[MAX_SERV_LEN - 1]='\0';
pamsmb_dlist->controllers[0].numservers=2;
pamsmb_dlist->numdomains=1;