Skip to content
This repository was archived by the owner on Jan 17, 2019. It is now read-only.

eqctl: do not process invalid input file name#87

Merged
lgirdwood merged 1 commit intothesofproject:masterfrom
ranj063:eqctl
Oct 2, 2018
Merged

eqctl: do not process invalid input file name#87
lgirdwood merged 1 commit intothesofproject:masterfrom
ranj063:eqctl

Conversation

@ranj063
Copy link
Copy Markdown
Collaborator

@ranj063 ranj063 commented Oct 1, 2018

Fixes seg faults when input file does not exist.

Signed-off-by: Ranjani Sridharan ranjani.sridharan@linux.intel.com

@ranj063
Copy link
Copy Markdown
Collaborator Author

ranj063 commented Oct 1, 2018

@lgirdwood @singalsu this fixes seg faults when input file does not exist.

Comment thread eqctl/eqctl.c Outdated
fh = fopen(setup, "r");
if (!fh) {
fprintf(stderr, "error: invalid input file name\n");
return -EINVAL;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

best return errno and use a more generic error message. See the fopen() man page.

Fixes seg faults when input file does not exist.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
@ranj063
Copy link
Copy Markdown
Collaborator Author

ranj063 commented Oct 2, 2018

@lgirdwood I've fixed the return value

@lgirdwood lgirdwood merged commit 54d191e into thesofproject:master Oct 2, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants