A new entry's index should not be larger than the number of its siblings (ITS#5684)

This commit is contained in:
Ralf Haferkamp 2008-09-04 13:56:31 +00:00
parent 1355e605d5
commit 86005f581e

View file

@ -3881,7 +3881,7 @@ check_name_index( CfEntryInfo *parent, ConfigType ce_type, Entry *e,
if ( isconfig && index == -1 ) {
index = 0;
}
if ( !isfrontend && index == -1 ) {
if (( !isfrontend && index == -1 ) || ( index > nsibs ) ){
index = nsibs;
}