]> git.ipfire.org Git - thirdparty/bacula.git/commitdiff
Allow up to 64 configuration items in ConfigIni object
authorEric Bollengier <eric@baculasystems.com>
Mon, 29 Nov 2021 15:11:50 +0000 (16:11 +0100)
committerEric Bollengier <eric@baculasystems.com>
Thu, 14 Sep 2023 11:56:56 +0000 (13:56 +0200)
bacula/src/dird/ua_run.c
bacula/src/lib/ini.h

index dc21b48e7e23f1caed375b3c67ff1fe00284d1a0..39b0a601593ecb673403f9f3d10e3eb43bd6b6f4 100644 (file)
@@ -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
index f7223cd84fe32af91f2d74a200708555074288fc..6390f6ec4956cee7559264ac9b11b71e5eb40a9f 100644 (file)
@@ -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"