patching with @donabrams's fix
This commit is contained in:
parent
bc32a948bf
commit
84b5c623ff
|
@ -10,6 +10,9 @@ char *sanitizeInput(char *input)
|
||||||
int c;
|
int c;
|
||||||
void *mem = NULL;
|
void *mem = NULL;
|
||||||
while (c = input[pos]) {
|
while (c = input[pos]) {
|
||||||
|
temp[cur] = (char)c;
|
||||||
|
cur++;
|
||||||
|
pos++;
|
||||||
/* Reserve space to escape colon in input */
|
/* Reserve space to escape colon in input */
|
||||||
if (c == ':') {
|
if (c == ':') {
|
||||||
cur++;
|
cur++;
|
||||||
|
@ -29,9 +32,6 @@ char *sanitizeInput(char *input)
|
||||||
if (c == ':') {
|
if (c == ':') {
|
||||||
temp[cur - 1] = ':';
|
temp[cur - 1] = ':';
|
||||||
}
|
}
|
||||||
temp[cur] = (char)c;
|
|
||||||
cur++;
|
|
||||||
pos++;
|
|
||||||
}
|
}
|
||||||
temp[cur] = '\0';
|
temp[cur] = '\0';
|
||||||
return temp;
|
return temp;
|
||||||
|
|
|
@ -3204,6 +3204,8 @@ ReturnObject *interpretInputStmtNode(StmtNode *node,
|
||||||
* but do not store it.
|
* but do not store it.
|
||||||
*/
|
*/
|
||||||
if (c == EOF || c == (int)'\r' || c == (int)'\n') break;
|
if (c == EOF || c == (int)'\r' || c == (int)'\n') break;
|
||||||
|
temp[cur] = (char)c;
|
||||||
|
cur++;
|
||||||
/* Reserve space to escape colon in input */
|
/* Reserve space to escape colon in input */
|
||||||
if (c == ':') {
|
if (c == ':') {
|
||||||
cur++;
|
cur++;
|
||||||
|
@ -3223,8 +3225,6 @@ ReturnObject *interpretInputStmtNode(StmtNode *node,
|
||||||
if (c == ':') {
|
if (c == ':') {
|
||||||
temp[cur - 1] = ':';
|
temp[cur - 1] = ':';
|
||||||
}
|
}
|
||||||
temp[cur] = (char)c;
|
|
||||||
cur++;
|
|
||||||
}
|
}
|
||||||
temp[cur] = '\0';
|
temp[cur] = '\0';
|
||||||
val = createStringValueObject(temp);
|
val = createStringValueObject(temp);
|
||||||
|
|
Loading…
Reference in New Issue