소스 검색

389 DS segfaults on libsyntax-plugin.so - part 3

https://bugzilla.redhat.com/show_bug.cgi?id=516611
Resolves: bug 516611
Bug Description: 389 DS segfaults on libsyntax-plugin.so - part 3
Reviewed by: nkinder (Thanks!)
Branch: HEAD
Fix Description: bin_filter_ava should check for null bvals
Platforms tested: RHEL5 x86_64
Flag Day: no
Doc impact: no
Rich Megginson 15 년 전
부모
커밋
9c0edff0cf
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      ldap/servers/plugins/syntaxes/bin.c

+ 1 - 1
ldap/servers/plugins/syntaxes/bin.c

@@ -251,7 +251,7 @@ bin_filter_ava( Slapi_PBlock *pb, struct berval *bvfilter,
 {
     int	i;
 
-    for ( i = 0; bvals[i] != NULL; i++ ) {
+    for ( i = 0; (bvals != NULL) && (bvals[i] != NULL); i++ ) {
         const struct berval *bv = slapi_value_get_berval(bvals[i]);
         int rc = slapi_berval_cmp(bv, bvfilter);