Skip to content

Conversation

skef
Copy link
Contributor

@skef skef commented Jan 6, 2020

Fix for #4084 Use-after-free (heap) in the SFD_GetFontMetaData() function
Fix for #4086 NULL pointer dereference in the SFDGetSpiros() function
Fix for #4088 NULL pointer dereference in the SFD_AssignLookups() function
Add empty sf->fontname string if it isn't set, fixing #4089 #4090 and many
other potential issues (many downstream calls to strlen() on the value).

Closes #4084
Closes #4086
Closes #4088
Closes #4089
Closes #4090

Meta-note: That I am continually annoyed at the number of open FontForge issues does not imply this is not a waste of time.

…ta() function

Fix for fontforge#4086 NULL pointer dereference in the SFDGetSpiros() function
Fix for fontforge#4088 NULL pointer dereference in the SFD_AssignLookups() function
Add empty sf->fontname string if it isn't set, fixing fontforge#4089 fontforge#4090 and many
  other potential issues (many downstream calls to strlen() on the value).
Comment on lines -4035 to +4036
cur->spiros = realloc(cur->spiros,(cur->spiro_max+=10)*sizeof(spiro_cp));
cur->spiros = realloc(cur->spiros,
(cur->spiro_max+=10)*sizeof(spiro_cp));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

>>> L1="                cur->spiros = realloc(cur->spiros,(cur->spiro_max+=10)*sizeof(spiro_cp));"
>>> L2="""
		cur->spiros = realloc(cur->spiros,
		                      (cur->spiro_max+=10)*sizeof(spiro_cp));"""
>>> import re
>>> re.sub(r'\s+', '', L2) == re.sub(r'\s+', '', L1)
True

What is the purpose of the added line break?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just increasing conformance with the mostly-followed 80 char/line rule while I was in the neighborhood.

Copy link
Member

@ctrlcctrlv ctrlcctrlv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@ctrlcctrlv ctrlcctrlv merged commit 048a91e into fontforge:master Jan 6, 2020
@frank-trampe
Copy link
Contributor

You guys played really hard-to-get on this one!

@skef
Copy link
Contributor Author

skef commented Jan 6, 2020

@frank-trampe These sorta feel less like maintenance than gamification.

@frank-trampe
Copy link
Contributor

It's all the rage these days.

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