Skip to content

Commit 6ac1c72

Browse files
author
Sergei Trofimovich
committed
contrib/mod_ldap.c: fix SIGSEGV in mod_ldap:ldap_mod_init ()
The crash happens due to missing sentinel value in `pstrcat()` ```c feats = pstrcat(tmp_pool, feats, i != 0 ? ", " : "", api_info.ldapai_extensions[i]); ``` The change is to add sentinel to `pstrcat()` call. Bug: #1027 Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
1 parent 0b8f005 commit 6ac1c72

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

contrib/mod_ldap.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3218,7 +3218,7 @@ static int ldap_mod_init(void) {
32183218

32193219
for (i = 0; api_info.ldapai_extensions[i]; i++) {
32203220
feats = pstrcat(tmp_pool, feats, i != 0 ? ", " : "",
3221-
api_info.ldapai_extensions[i]);
3221+
api_info.ldapai_extensions[i], NULL);
32223222
ldap_memfree(api_info.ldapai_extensions[i]);
32233223
}
32243224

0 commit comments

Comments
 (0)