sync with OpenBSD -current

This commit is contained in:
purplerain 2024-07-12 14:44:09 +02:00
parent 2d1e52c274
commit b5b25afdb8
Signed by: purplerain
GPG key ID: F42C07F07E2E35B7
657 changed files with 21464 additions and 54675 deletions

View file

@ -678,7 +678,7 @@ parseline(
b->treesize = newsize;
/* Re-derive top after realloc() to avoid undefined behaviour
(and crashes on architectures that track pointer bounds). */
if (top >= (DTIndex *) old && top < (DTIndex *) &old[oldsize])
if (old && top >= (DTIndex *) old && top < (DTIndex *) &old[oldsize])
top = (DTIndex *) (((char *)new) + (((char *)top)-(char *)old));
}
p = &b->tree[b->treeused];