repo: rxvt-unicode-sixel
action: commit
revision: 
path_from: 
revision_from: 8c383c7dd6e9ec86384f01d55860d7ef01461477:
path_to: 
revision_to: 
git.thebackupbox.net
rxvt-unicode-sixel
git clone git://git.thebackupbox.net/rxvt-unicode-sixel
commit 8c383c7dd6e9ec86384f01d55860d7ef01461477
Author: Marc Lehmann 
Date:   Thu Feb 20 18:59:13 2014 +0000

    *** empty log message ***

diff --git a/src/command.C b/src/command.C
index 542d14c64f7cc70dc427a270d6300d37d1bd03d0..
index ..2bd1a366d839c694018a6223b7ad2a242b30639f 100644
--- a/src/command.C
+++ b/src/command.C
@@ -3229,7 +3229,7 @@ rxvt_term::get_to_st (unicode_t &ends_how)
   unicode_t ch;
   bool seen_esc = false;
   unsigned int n = 0;
-  wchar_t string[STRING_MAX];
+  wchar_t string[CBUFSIZ];

   while ((ch = cmd_getc ()) != NOCHAR)
     {
@@ -3254,7 +3254,7 @@ rxvt_term::get_to_st (unicode_t &ends_how)

       seen_esc = false;

-      if (n >= STRING_MAX - 1)
+      if (n >= sizeof (string) - 1)
         // stop at some sane length
         return NULL;

diff --git a/src/command.h b/src/command.h
index 0d261128ae62ab64e465ffa0f514c8f3f9734733..
index ..03ba3b1707289d8bca4488e7f5a5b80ed2e40efc 100644
--- a/src/command.h
+++ b/src/command.h
@@ -5,9 +5,6 @@
 #ifndef COMMAND_H_
 #define COMMAND_H_

-// STRING_MAX __MUST__ not be larger than what CBUFSIZ can hold.
-#define STRING_MAX	2048	/* max string size for process_{dcs,osc}_seq () */
-
 #define ESC_ARGS	32	/* max # of args for esc sequences */

 #ifndef MULTICLICK_TIME
diff --git a/src/rxvt.h b/src/rxvt.h
index 0998583eb41c412ff13db6aded8edacd01b1efc8..
index ..1c1909e5aae2304381487b654315f817a56a5490 100644
--- a/src/rxvt.h
+++ b/src/rxvt.h
@@ -664,7 +664,7 @@ enum {
 // do not change these constants lightly, there are many interdependencies
 #define IMBUFSIZ               128     // input modifier buffer sizes
 #define KBUFSZ                 512     // size of keyboard mapping buffer
-#define CBUFSIZ                2048    // size of command buffer
+#define CBUFSIZ                2048    // size of command buffer (longest command sequence possible)
 #define CBUFCNT                8       // never call pty_fill/cmd_parse more than this often in a row
 #define UBUFSIZ                2048    // character buffer

-----END OF PAGE-----