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

Allocate own string for invoice description #1020

Closed

Conversation

ZmnSCPxj
Copy link
Contributor

@ZmnSCPxj ZmnSCPxj commented Feb 16, 2018

Prevent segfault when long invoice description is generated.

Fixes: #1014

Fixes: ElementsProject#1014

If `b11->description_hash` is set, then `b11->description` is
  NULL. So, we must allocate the description string separately.
Copy link
Contributor

@rustyrussell rustyrussell left a comment

Choose a reason for hiding this comment

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

Unfortunately we need to simply fail for now, if description is too long. There's no way to transport the description, and it's a requirement; the hash code is really for alternate transports, and I was overzealous to ever implement it in c-lightning :(

@ZmnSCPxj
Copy link
Contributor Author

Okay, will close this request and reopen a new one instead.

@ZmnSCPxj ZmnSCPxj closed this Feb 17, 2018
ZmnSCPxj added a commit to ZmnSCPxj/lightning that referenced this pull request Feb 17, 2018
ZmnSCPxj added a commit to ZmnSCPxj/lightning that referenced this pull request Feb 17, 2018
rustyrussell pushed a commit that referenced this pull request Feb 19, 2018
@ZmnSCPxj ZmnSCPxj deleted the long-invoice-description branch February 19, 2018 12:34
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