s3: Fix bug 7688, rpcclient command line completion crashing
authorVolker Lendecke <vl@samba.org>
Sat, 18 Sep 2010 14:37:04 +0000 (07:37 -0700)
committerKarolin Seeger <kseeger@samba.org>
Mon, 27 Sep 2010 19:29:48 +0000 (21:29 +0200)
We've grown more than 100 rpcclient commands by now, so this would overwrite
the array of 100 completions. There's nicer ways to fix this problem, but 1000
rpcclient commands should be at least a bit away.
(cherry picked from commit ec3bca61a10d8dcaa6a94046120dd414e39289b1)

source3/rpcclient/rpcclient.c

index e24538b8044a2909984eeece7227601be5b1e402..f05facb353e295840685c6b0f94ea11e0764565e 100644 (file)
@@ -49,7 +49,7 @@ handle completion of commands for readline
 ****************************************************************************/
 static char **completion_fn(const char *text, int start, int end)
 {
-#define MAX_COMPLETIONS 100
+#define MAX_COMPLETIONS 1000
        char **matches;
        int i, count=0;
        struct cmd_list *commands = cmd_list;