mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-29 08:42:28 +00:00
Write more tests attempting to break windows
This time I haven't succeeded in breaking anything which is a good sign.
This commit is contained in:
parent
476926790a
commit
126a44dc49
7 changed files with 331 additions and 37 deletions
|
@ -2276,7 +2276,7 @@ static struct Asset *GetAssetZip(const char *path, size_t pathlen) {
|
|||
hash = Hash(path, pathlen);
|
||||
for (step = 0;; ++step) {
|
||||
i = (hash + ((step * (step + 1)) >> 1)) & (assets.n - 1);
|
||||
if (!assets.p[i].hash)
|
||||
if (i >= assets.n || !assets.p || !assets.p[i].hash)
|
||||
return NULL;
|
||||
if (hash == assets.p[i].hash &&
|
||||
pathlen == ZIP_CFILE_NAMESIZE(zmap + assets.p[i].cf) &&
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue