8079841: Buffer underflow with empty zip entry names
Summary: check for zero-length entry name before accessing "last" byte
Reviewed-by: sherman, martin
shared callsite+ −
1,2,3,4+ −
2147484647,2147485647,2147486647,2147487647+ −
1.1,2.2,3.3,4.4+ −
one,two,three,four+ −
1,2,3,4,2147484647,2147485647,2147486647,2147487647,1.1,2.2,3.3,4.4,one,two,three,four+ −
1,2,3,4,1+ −
1,2,3,4,1,2,3,4+ −
1,2,3,4,2147484647,2147485647,2147486647,2147487647+ −
1,2,3,4,1.1,2.2,3.3,4.4+ −
1,2,3,4,one,two,three,four+ −
2147484647,2147485647,2147486647,2147487647,2147484647+ −
2147484647,2147485647,2147486647,2147487647,1,2,3,4+ −
2147484647,2147485647,2147486647,2147487647,2147484647,2147485647,2147486647,2147487647+ −
2147484647,2147485647,2147486647,2147487647,1.1,2.2,3.3,4.4+ −
2147484647,2147485647,2147486647,2147487647,one,two,three,four+ −
1.1,2.2,3.3,4.4,1.1+ −
1.1,2.2,3.3,4.4,1,2,3,4+ −
1.1,2.2,3.3,4.4,2147484647,2147485647,2147486647,2147487647+ −
1.1,2.2,3.3,4.4,1.1,2.2,3.3,4.4+ −
1.1,2.2,3.3,4.4,one,two,three,four+ −
one,two,three,four,one+ −
one,two,three,four,1,2,3,4+ −
one,two,three,four,2147484647,2147485647,2147486647,2147487647+ −
one,two,three,four,1.1,2.2,3.3,4.4+ −
one,two,three,four,one,two,three,four+ −
separate callsites+ −
1,2,3,4+ −
2147484647,2147485647,2147486647,2147487647+ −
1.1,2.2,3.3,4.4+ −
one,two,three,four+ −
1,2,3,4,2147484647,2147485647,2147486647,2147487647,1.1,2.2,3.3,4.4,one,two,three,four+ −
1,2,3,4,1,2,3,4+ −
1,2,3,4,2147484647,2147485647,2147486647,2147487647+ −
1,2,3,4,1.1,2.2,3.3,4.4+ −
1,2,3,4,one,two,three,four+ −
1,2,3,4,1+ −
2147484647,2147485647,2147486647,2147487647,1,2,3,4+ −
2147484647,2147485647,2147486647,2147487647,2147484647,2147485647,2147486647,2147487647+ −
2147484647,2147485647,2147486647,2147487647,1.1,2.2,3.3,4.4+ −
2147484647,2147485647,2147486647,2147487647,one,two,three,four+ −
2147484647,2147485647,2147486647,2147487647,2147484647+ −
1.1,2.2,3.3,4.4,1,2,3,4+ −
1.1,2.2,3.3,4.4,2147484647,2147485647,2147486647,2147487647+ −
1.1,2.2,3.3,4.4,1.1,2.2,3.3,4.4+ −
1.1,2.2,3.3,4.4,one,two,three,four+ −
1.1,2.2,3.3,4.4,1.1+ −
one,two,three,four,1,2,3,4+ −
one,two,three,four,2147484647,2147485647,2147486647,2147487647+ −
one,two,three,four,1.1,2.2,3.3,4.4+ −
one,two,three,four,one,two,three,four+ −
one,two,three,four,one+ −
+ −
oldia = 1,2,3,4+ −
oldia = 1,2,3,4+ −
+ −
Redoing with sparse arrays+ −
shared callsite+ −
1,2,3,4,,,,,,,sparse+ −
2147484647,2147485647,2147486647,2147487647+ −
1.1,2.2,3.3,4.4+ −
one,two,three,four+ −
1,2,3,4,,,,,,,sparse,2147484647,2147485647,2147486647,2147487647,1.1,2.2,3.3,4.4,one,two,three,four+ −
1,2,3,4,,,,,,,sparse,1+ −
1,2,3,4,,,,,,,sparse,1,2,3,4,,,,,,,sparse+ −
1,2,3,4,,,,,,,sparse,2147484647,2147485647,2147486647,2147487647+ −
1,2,3,4,,,,,,,sparse,1.1,2.2,3.3,4.4+ −
1,2,3,4,,,,,,,sparse,one,two,three,four+ −
2147484647,2147485647,2147486647,2147487647,2147484647+ −
2147484647,2147485647,2147486647,2147487647,1,2,3,4,,,,,,,sparse+ −
2147484647,2147485647,2147486647,2147487647,2147484647,2147485647,2147486647,2147487647+ −
2147484647,2147485647,2147486647,2147487647,1.1,2.2,3.3,4.4+ −
2147484647,2147485647,2147486647,2147487647,one,two,three,four+ −
1.1,2.2,3.3,4.4,1.1+ −
1.1,2.2,3.3,4.4,1,2,3,4,,,,,,,sparse+ −
1.1,2.2,3.3,4.4,2147484647,2147485647,2147486647,2147487647+ −
1.1,2.2,3.3,4.4,1.1,2.2,3.3,4.4+ −
1.1,2.2,3.3,4.4,one,two,three,four+ −
one,two,three,four,one+ −
one,two,three,four,1,2,3,4,,,,,,,sparse+ −
one,two,three,four,2147484647,2147485647,2147486647,2147487647+ −
one,two,three,four,1.1,2.2,3.3,4.4+ −
one,two,three,four,one,two,three,four+ −
separate callsites+ −
1,2,3,4,,,,,,,sparse+ −
2147484647,2147485647,2147486647,2147487647+ −
1.1,2.2,3.3,4.4+ −
one,two,three,four+ −
1,2,3,4,,,,,,,sparse,2147484647,2147485647,2147486647,2147487647,1.1,2.2,3.3,4.4,one,two,three,four+ −
1,2,3,4,,,,,,,sparse,1,2,3,4,,,,,,,sparse+ −
1,2,3,4,,,,,,,sparse,2147484647,2147485647,2147486647,2147487647+ −
1,2,3,4,,,,,,,sparse,1.1,2.2,3.3,4.4+ −
1,2,3,4,,,,,,,sparse,one,two,three,four+ −
1,2,3,4,,,,,,,sparse,1+ −
2147484647,2147485647,2147486647,2147487647,1,2,3,4,,,,,,,sparse+ −
2147484647,2147485647,2147486647,2147487647,2147484647,2147485647,2147486647,2147487647+ −
2147484647,2147485647,2147486647,2147487647,1.1,2.2,3.3,4.4+ −
2147484647,2147485647,2147486647,2147487647,one,two,three,four+ −
2147484647,2147485647,2147486647,2147487647,2147484647+ −
1.1,2.2,3.3,4.4,1,2,3,4,,,,,,,sparse+ −
1.1,2.2,3.3,4.4,2147484647,2147485647,2147486647,2147487647+ −
1.1,2.2,3.3,4.4,1.1,2.2,3.3,4.4+ −
1.1,2.2,3.3,4.4,one,two,three,four+ −
1.1,2.2,3.3,4.4,1.1+ −
one,two,three,four,1,2,3,4,,,,,,,sparse+ −
one,two,three,four,2147484647,2147485647,2147486647,2147487647+ −
one,two,three,four,1.1,2.2,3.3,4.4+ −
one,two,three,four,one,two,three,four+ −
one,two,three,four,one+ −
Restored ia = 1,2,3,4+ −
+ −
concat type expansion+ −
1,2,3,4,2147484647,2147485647,2147486647,2147487647+ −
1,2,3,4,1.1,2.2,3.3,4.4+ −
1,2,3,4,one,two,three,four+ −
2147484647,2147485647,2147486647,2147487647,1,2,3,4+ −
2147484647,2147485647,2147486647,2147487647,1.1,2.2,3.3,4.4+ −
2147484647,2147485647,2147486647,2147487647,one,two,three,four+ −
1.1,2.2,3.3,4.4,1,2,3,4+ −
1.1,2.2,3.3,4.4,2147484647,2147485647,2147486647,2147487647+ −
1.1,2.2,3.3,4.4,one,two,three,four+ −
+ −
concat varargs+ −
1,2,3,4,2147484647,2147485647,2147486647,2147487647+ −
1,2,3,4,2147484647,2147485647,2147486647,2147487647,1.1,2.2,3.3,4.4,one,two,three,four+ −
1,2,3,4,1,4294967294,4711.17,function() { print("hello, world") }+ −
+ −
sanity checks+ −
number = 1+ −
number = 2+ −
number = 3+ −
number = 4+ −
number = 1+ −
number = 4294967294+ −
number = 4711.17+ −
hello, world+ −
1,2,3,4,[object Object]+ −
1,2,3,4,[object Object],[object Object]+ −