mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-27 01:59:38 -05:00
Minor cleanup (coverity)
This commit is contained in:
parent
e861305d50
commit
86d81fa153
1 changed files with 1 additions and 2 deletions
|
|
@ -327,6 +327,7 @@ pw2entry( Backend *be, struct passwd *pw, Entry *e )
|
|||
*/
|
||||
if (pw->pw_gecos[0]) {
|
||||
char *s;
|
||||
char buf[1024];
|
||||
|
||||
ber_str2bv( pw->pw_gecos, 0, 0, &val );
|
||||
attr_merge_normalize_one( e, ad_desc, &val, NULL );
|
||||
|
|
@ -336,8 +337,6 @@ pw2entry( Backend *be, struct passwd *pw, Entry *e )
|
|||
|
||||
s = ber_bvchr( &val, '&' );
|
||||
if ( s ) {
|
||||
char buf[1024];
|
||||
|
||||
if( val.bv_len + pwlen < sizeof(buf) ) {
|
||||
int i = s - val.bv_val;
|
||||
strncpy( buf, val.bv_val, i );
|
||||
|
|
|
|||
Loading…
Reference in a new issue