-
Notifications
You must be signed in to change notification settings - Fork 196
Fix a segmentation fault if the private key file is corrupted #1358
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
Conversation
|
Looks sensible. I was about to ask you to free(secretkeyfile); but then I realised that FatalError never returns ! |
Fix a segmentation fault if the private key file is corrupted
|
cf-agent is supposed to work even without keys (even though a warning is logged). This breaks all acceptance tests, @lpefferkorn please run "make check" before every pull request. |
|
Sorry, my bad for merging. I revert that change. @lpefferkorn could you provide a stack trace of the crash? A null-pointer check seems to be missing, just somewhere else (and not handled via FatalError). |
|
@jimis I usually always run @vohi: The return value of I've not found any check of return value for this function, even if it's defined to return a bool. Is it expected ? Regarding |
|
I assume this happens on 3.5.x? Or does this happen in matter too?
|
|
@cduclos Segfault with current master (c6248f6), but ok with 3.5.3 (however the message can be improved a bit for the end-user?) 3.5.3: current master: |
When the private key file is corrupted, cf-promises and cf-agent generate a segmentation fault:
Without the patch:
With the patch:
Feedback is welcome :-)