mirror of
https://https.git.savannah.gnu.org/git/bash.git
synced 2026-08-08 11:12:36 +02:00
commit bash-20150612 snapshot
This commit is contained in:
@@ -3750,6 +3750,11 @@ dequote_string (string)
|
||||
char *result, *send;
|
||||
DECLARE_MBSTATE;
|
||||
|
||||
#if defined (DEBUG)
|
||||
if (string[0] == CTLESC && string[1] == 0)
|
||||
itrace("dequote_string: string with bare CTLESC");
|
||||
#endif
|
||||
|
||||
slen = strlen (string);
|
||||
|
||||
t = result = (char *)xmalloc (slen + 1);
|
||||
@@ -3760,6 +3765,14 @@ dequote_string (string)
|
||||
return (result);
|
||||
}
|
||||
|
||||
/* A string consisting of only a single CTLESC should pass through unchanged */
|
||||
if (string[0] == CTLESC && string[1] == 0)
|
||||
{
|
||||
result[0] = CTLESC;
|
||||
result[1] = '\0';
|
||||
return (result);
|
||||
}
|
||||
|
||||
/* If no character in the string can be quoted, don't bother examining
|
||||
each character. Just return a copy of the string passed to us. */
|
||||
if (strchr (string, CTLESC) == NULL)
|
||||
|
||||
Reference in New Issue
Block a user