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

An occasional high-risk problem #83

Closed
zhrf2020 opened this issue Aug 4, 2022 · 2 comments · Fixed by #87
Closed

An occasional high-risk problem #83

zhrf2020 opened this issue Aug 4, 2022 · 2 comments · Fixed by #87
Assignees
Labels

Comments

@zhrf2020
Copy link

zhrf2020 commented Aug 4, 2022

Source file: chkconfig.c where the function: qsort(services, numServices, sizeof(*services), serviceNameCmp); here the function serviceNameCmp

static int serviceNameCmp(const void *a, const void *b) {
     return strcmp(*(char **)a, *(char **)b);
}

may cause function qsort to segfault
Reference: https://stackoverflow.com/questions/33774013/getting-segmentation-fault-when-using-qsort-for-sorting-array-of-strings-in-c

@jamacku jamacku self-assigned this Aug 4, 2022
@lnykryn
Copy link
Member

lnykryn commented Aug 8, 2022

#87

@jamacku jamacku added the bug label Aug 8, 2022
zlnice added a commit to zlnice/chkconfig that referenced this issue Aug 8, 2022
…he directory of /etc/chkconfig.d,execute chkconfig will coredump.

fedora-sysv#83
@jamacku jamacku linked a pull request Oct 4, 2022 that will close this issue
@jamacku
Copy link
Member

jamacku commented Oct 4, 2022

Fixed via #87. Thank you for reporting this issue.

@jamacku jamacku closed this as completed Oct 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants