emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r104023: * cmdproxy.c (try_dequote_cm


From: Daniel Colascione
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r104023: * cmdproxy.c (try_dequote_cmdline): Notice variable substitutions in
Date: Tue, 26 Apr 2011 21:19:15 -0700
User-agent: Bazaar (2.3.1)

------------------------------------------------------------
revno: 104023
committer: Daniel Colascione <address@hidden>
branch nick: trunk
timestamp: Tue 2011-04-26 21:19:15 -0700
message:
  * cmdproxy.c (try_dequote_cmdline): Notice variable substitutions in
  quoted strings and bail out.
modified:
  nt/ChangeLog
  nt/cmdproxy.c
=== modified file 'nt/ChangeLog'
--- a/nt/ChangeLog      2011-04-26 10:44:03 +0000
+++ b/nt/ChangeLog      2011-04-27 04:19:15 +0000
@@ -1,3 +1,8 @@
+2011-04-27  Daniel Colascione  <address@hidden>
+
+       * cmdproxy.c (try_dequote_cmdline): Notice variable substitutions
+       inside quotation marks and bail out.
+
 2011-04-26  Daniel Colascione <address@hidden>
 
        * cmdproxy.c (try_dequote_cmdline): New function.

=== modified file 'nt/cmdproxy.c'
--- a/nt/cmdproxy.c     2011-04-26 10:44:03 +0000
+++ b/nt/cmdproxy.c     2011-04-27 04:19:15 +0000
@@ -362,10 +362,20 @@
           state = NORMAL;
           break;
         case INSIDE_QUOTE:
-          *new_pos++ = c;
-          if (c == '"')
-            state = NORMAL;
-          
+          switch (c)
+            {
+            case '"':
+              *new_pos++ = c;
+              state = NORMAL;
+              break;
+            case '%':
+            case '!':
+              /* Variable substitution inside quote.  Bail out.  */
+              return 0;
+            default:
+              *new_pos++ = c;
+              break;
+            }
           break;
         }
     }


reply via email to

[Prev in Thread] Current Thread [Next in Thread]