Fix index_change_vals NULL vals bug (ITS#238)

This commit is contained in:
Kurt Zeilenga 1999-07-28 22:57:52 +00:00
parent 10f138bc84
commit 0e4e5c7a13
2 changed files with 7 additions and 2 deletions

View File

@ -248,7 +248,8 @@ bdb2i_index_add_values(
return( -1 );
}
for ( i = 0; vals[i] != NULL; i++ ) {
if( vals != NULL ) {
for ( i = 0; vals[i] != NULL; i++ ) {
/*
* presence index entry
*/
@ -340,6 +341,7 @@ bdb2i_index_add_values(
if ( bigbuf != NULL ) {
free( bigbuf );
}
}
}
bdb2i_cache_close( be, db );

View File

@ -306,7 +306,8 @@ index_change_values(
}
for ( i = 0; vals[i] != NULL; i++ ) {
if ( vals != NULL ) {
for ( i = 0; vals[i] != NULL; i++ ) {
/*
* presence index entry
*/
@ -416,7 +417,9 @@ index_change_values(
if ( bigbuf != NULL ) {
free( bigbuf );
}
}
}
ldbm_cache_close( be, db );
return( 0 );