8231863: Crash if classpath is read from @argument file and the main gets option argument

Reviewed-by: alanb, mchung
This commit is contained in:
Mat Carter 2019-11-11 17:43:10 -08:00 committed by Henry Jen
parent a4c01b3c46
commit f390c87d8d
3 changed files with 41 additions and 7 deletions

View file

@ -337,7 +337,9 @@ static JLI_List readArgFile(FILE *file) {
// remaining partial token
if (ctx.state == IN_TOKEN || ctx.state == IN_QUOTE) {
if (ctx.parts->size != 0) {
JLI_List_add(rv, JLI_List_combine(ctx.parts));
token = JLI_List_combine(ctx.parts);
checkArg(token);
JLI_List_add(rv, token);
}
}
JLI_List_free(ctx.parts);