8079841: Buffer underflow with empty zip entry names
Check for zero-length entry name before accessing "last" byte Reviewed-by: sherman, martin
This commit is contained in:
parent
5dbc7756f6
commit
292354a1fe
@ -1206,7 +1206,7 @@ ZIP_GetEntry2(jzfile *zip, char *name, jint ulen, jboolean addSlash)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Slash is already there? */
|
/* Slash is already there? */
|
||||||
if (name[ulen-1] == '/') {
|
if (ulen > 0 && name[ulen - 1] == '/') {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user