From: Howard Chu Date: Wed, 24 Aug 2022 13:40:51 +0000 (+0100) Subject: ITS#9904 ldif_open_url: check for ber_strdup failure X-Git-Tag: OPENLDAP_REL_ENG_2_5_14~100 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=752d320cf96e46f24c0900f1a8f6af0a3fc3c4ce;p=thirdparty%2Fopenldap.git ITS#9904 ldif_open_url: check for ber_strdup failure Code present since 1999, df8f7cbb9b79be3be9205d116d1dd0b263d6861a --- diff --git a/libraries/libldap/fetch.c b/libraries/libldap/fetch.c index 9e426dc647..536871bcfe 100644 --- a/libraries/libldap/fetch.c +++ b/libraries/libldap/fetch.c @@ -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] != '/' ) {