]> git.ipfire.org Git - thirdparty/openldap.git/commitdiff
ITS#9904 ldif_open_url: check for ber_strdup failure
authorHoward Chu <hyc@openldap.org>
Wed, 24 Aug 2022 13:40:51 +0000 (14:40 +0100)
committerQuanah Gibson-Mount <quanah@openldap.org>
Wed, 24 Aug 2022 18:23:50 +0000 (18:23 +0000)
Code present since 1999, df8f7cbb9b79be3be9205d116d1dd0b263d6861a

libraries/libldap/fetch.c

index 9e426dc647cb606844f08a93a8d53d77e12d7d82..536871bcfe3d0decc4e61043600079dfa1188ba3 100644 (file)
@@ -69,6 +69,8 @@ ldif_open_url(
                }
 
                p = ber_strdup( urlstr );
+               if ( p == NULL )
+                       return NULL;
 
                /* But we should convert to LDAP_DIRSEP before use */
                if ( LDAP_DIRSEP[0] != '/' ) {