From: Eric Bollengier Date: Mon, 29 Nov 2021 15:11:50 +0000 (+0100) Subject: Allow up to 64 configuration items in ConfigIni object X-Git-Tag: Beta-15.0.0~742 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=98893aaa3dabbb19e51315cfac3f32526425774e;p=thirdparty%2Fbacula.git Allow up to 64 configuration items in ConfigIni object --- diff --git a/bacula/src/dird/ua_run.c b/bacula/src/dird/ua_run.c index dc21b48e7..39b0a6015 100644 --- a/bacula/src/dird/ua_run.c +++ b/bacula/src/dird/ua_run.c @@ -971,7 +971,7 @@ static int plugin_display_options(UAContext *ua, JCR *jcr, ConfigFile *ini) configure_again: ua->send_msg(_("Plugin Restore Options\n")); ua->send_msg(_("Option Current Value Default Value\n")); - for (nb=0; ini->items[nb].name; nb++) { + for (nb=0; nb < MAX_INI_ITEMS && ini->items[nb].name ; nb++) { if (ini->items[nb].found) { /* When calling the handler, It will convert the value diff --git a/bacula/src/lib/ini.h b/bacula/src/lib/ini.h index f7223cd84..6390f6ec4 100644 --- a/bacula/src/lib/ini.h +++ b/bacula/src/lib/ini.h @@ -84,7 +84,7 @@ struct ini_items { /* When reading a ini file, we limit the number of items that we * can create */ -#define MAX_INI_ITEMS 32 +#define MAX_INI_ITEMS 64 /* Special RestoreObject name used to get user input at restore time */ #define INI_RESTORE_OBJECT_NAME "RestoreOptions"