sync with OpenBSD -current

This commit is contained in:
purplerain 2025-01-10 01:40:29 +00:00
parent 4b49aefbb1
commit 1fd36b57f8
Signed by: purplerain
GPG key ID: F42C07F07E2E35B7
945 changed files with 81965 additions and 59988 deletions

View file

@ -126,7 +126,7 @@ bdfReadBitmap(CharInfoPtr pCI, FontFilePtr file, int bit, int byte,
if (!line)
break;
if (widthBits == 0) {
if ((widthBits == 0) || (picture == NULL)) {
if (bdfIsPrefix(line, "ENDCHAR"))
break;
else
@ -152,7 +152,7 @@ bdfReadBitmap(CharInfoPtr pCI, FontFilePtr file, int bit, int byte,
for (i = widthHexChars - inLineLen; i > 0; i--)
picture[nextByte++] = 0;
}
else {
else if (nextByte > 0) {
unsigned char mask;
mask = 0xff << (8 - (widthBits & 0x7));