Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix hb_buffer deserialization #5028

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

drott
Copy link
Collaborator

@drott drott commented Jan 29, 2025

IIUC this line intends to check that the last
character closes the buffer array and != should be ==.

IIUC this line intends to check that the last
character closes the buffer array and != should be ==.
@behdad
Copy link
Member

behdad commented Jan 29, 2025

I'm not quite sure what the intention was :)). But the two other similar pieces of code do it slightly differently:

if (pe < orig_pe && *pe == ']')
{
pe++;
if (p == pe)
p++;
}
*end_ptr = p;
return p == pe;
}

if (pe < orig_pe && *pe == '>')
{
pe++;
if (p == pe)
p++;
}
*end_ptr = p;
return p == pe;

I wonder if we should do something similar here.

@drott
Copy link
Collaborator Author

drott commented Jan 30, 2025

What do those bits mean.. ignore whitespace until the closing delimiter? Not sure what the text-format deserialization looks like but I assume the '>' is some sort of array-like closing delimiter in the text format?

@behdad
Copy link
Member

behdad commented Jan 30, 2025

What do those bits mean.. ignore whitespace until the closing delimiter?

I confess I'm not sure what that code does :)). I'll dig into it and report back.

Not sure what the text-format deserialization looks like but I assume the '>' is some sort of array-like closing delimiter in the text format?

Yes. The text format for Unicodes is like: <U+0041|U+0042> or something like that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy