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