gcc/ada/
* rtinit.c (skip_quoted_string): Handle malformed command line
with no closing double quote.
(skip_argument): Handle case in which a null character is
encountered by skip_quote_string.
}
ci++;
}
+
+ /* Handle the case in which a nul character was found instead of a closing
+ double quote. In that case consider all the backslashes as literal
+ characters. */
+ if (*ci == '\0')
+ {
+ for (int i=0; i<qbs_count; i++)
+ {
+ *co='\\';
+ co++;
+ }
+ }
+
*current_in = ci;
*current_out = co;
}
bs_count = 0;
*co = *ci; co++;
}
- ci++;
+ if (*ci != '\0')
+ {
+ ci++;
+ }
}
for (int i=0; i<bs_count; i++)