From ff281dcbf48de1802791f7c30a1182d20bec6031 Mon Sep 17 00:00:00 2001
From: Morris Jette <jette@schedmd.com>
Date: Fri, 11 Oct 2013 13:41:41 -0700
Subject: [PATCH] Revert hostlist range size

Revert commit 626be3ea224a48a688ba62f2cc58c0ffc60eb770
It was causing stack overflow and memory corruption
---
 NEWS                  | 1 -
 src/common/hostlist.c | 2 +-
 2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/NEWS b/NEWS
index 7e116a3a352..af4567d7240 100644
--- a/NEWS
+++ b/NEWS
@@ -14,7 +14,6 @@ documents those changes that are of interest to users and admins.
  -- Minor document update to include note about PrivateData=Usage for the
     slurm.conf when using the DBD.
  -- Expand information reported with DebugFlags=backfill.
- -- Expand maximum hostlist ranges from 12k to 64k elements.
 
 * Changes in Slurm 2.6.3
 ========================
diff --git a/src/common/hostlist.c b/src/common/hostlist.c
index 9a21b960119..1bbfddff47a 100644
--- a/src/common/hostlist.c
+++ b/src/common/hostlist.c
@@ -193,7 +193,7 @@ extern void * lsd_nomem_error(char *file, int line, char *mesg);
 #define MAX_RANGE    (64*1024)    /* 64K Hosts */
 
 /* max number of ranges that will be processed between brackets */
-#define MAX_RANGES   (64*1024)    /* 64K Ranges */
+#define MAX_RANGES   (12*1024)    /* 12K Ranges */
 
 /* size of internal hostname buffer (+ some slop), hostnames will probably
  * be truncated if longer than MAXHOSTNAMELEN */
-- 
GitLab