mirror of
https://git.openldap.org/openldap/openldap.git
synced 2026-01-04 14:10:39 -05:00
ITS#722: disallow argument buffer overflow
This commit is contained in:
parent
d8c4df6f39
commit
6a3b8e281b
1 changed files with 3 additions and 4 deletions
|
|
@ -106,7 +106,9 @@ doargs(
|
|||
g->slapd_configfile = strdup( optarg );
|
||||
break;
|
||||
case 'r': /* slapd replog file */
|
||||
strcpy( g->slapd_replogfile, optarg );
|
||||
strncpy( g->slapd_replogfile, optarg,
|
||||
sizeof(g->slapd_replogfile)-1 );
|
||||
g->slapd_replogfile[sizeof(g->slapd_replogfile)-1] = '\0';
|
||||
rflag++;
|
||||
break;
|
||||
case 't': /* dir to use for our copies of replogs */
|
||||
|
|
@ -150,7 +152,4 @@ doargs(
|
|||
#endif
|
||||
|
||||
return 0;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue