Misc CVE fixes#4091
Merged
Merged
Conversation
…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).
ctrlcctrlv
reviewed
Jan 6, 2020
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)); |
Member
There was a problem hiding this comment.
>>> 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)
TrueWhat is the purpose of the added line break?
Contributor
Author
There was a problem hiding this comment.
Just increasing conformance with the mostly-followed 80 char/line rule while I was in the neighborhood.
Contributor
|
You guys played really hard-to-get on this one! |
Contributor
Author
|
@frank-trampe These sorta feel less like maintenance than gamification. |
Contributor
|
It's all the rage these days. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.