-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
avoid the stack-smasher strcpy-alloca and minor cleanup
- Loading branch information
Showing
2 changed files
with
5 additions
and
7 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
605c363
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this, Jameson! I couldn't figure out where the crashes in #9380 were coming from. How did you track this one down?
605c363
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So if
strlen(fname) % 8 == 0
you would write some zeros outside the reserved buffer?I actually looked at that line, and thought it looked funny, and control checked to see that it was big enough, but ended up with the wrong result.
605c363
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The OS X compilers have stack smashing protection builtin. I don't know why Debian doesn't enable them. It couldn't start and lldb directly blamed this function
605c363
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So should this be cherry-picked into #9376? We might need several other marked-for-backporting commits to get it to apply cleanly?
605c363
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please check that f129236 is sufficient for this same fix on release-0.3.