]> git.sur5r.net Git - openldap/commitdiff
copy username, much like other string-valued options (more about ITS#6257)
authorPierangelo Masarati <ando@openldap.org>
Wed, 19 Aug 2009 21:46:07 +0000 (21:46 +0000)
committerPierangelo Masarati <ando@openldap.org>
Wed, 19 Aug 2009 21:46:07 +0000 (21:46 +0000)
libraries/libldap/cyrus.c

index 5591682746a276dee2b6228d3e3bc50f14a7d90a..c9a5a462430a6090a9a07cded72be0e0295071af 100644 (file)
@@ -1035,7 +1035,7 @@ ldap_int_sasl_get_option( LDAP *ld, int option, void *arg )
                                return -1;
                        }
 
-                       *(char **)arg = username;
+                       *(char **)arg = username ? LDAP_STRDUP( username ) : NULL;
                } break;
 
                case LDAP_OPT_X_SASL_SECPROPS: