Bug 1507944
| Summary: | afpcmd may crash on long options parsing | ||
|---|---|---|---|
| Product: | [Fedora] Fedora EPEL | Reporter: | Petr Benes <petrben> |
| Component: | afpfs-ng | Assignee: | Michal Ambroz <rebus> |
| Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | epel7 | CC: | lkundrak |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | afpfs-ng-0.8.1-35.fc33 afpfs-ng-0.8.1-35.fc34 afpfs-ng-0.8.1-35.el7 afpfs-ng-0.8.1-35.el8 | Doc Type: | If docs needed, set a value |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2021-05-05 00:53:45 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
This package has changed maintainer in the Fedora. Reassigning to the new maintainer of this component. This package has changed maintainer in the Fedora. Reassigning to the new maintainer of this component. FEDORA-EPEL-2021-a7cac9b814 has been submitted as an update to Fedora EPEL 8. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2021-a7cac9b814 FEDORA-2021-e5a17b617c has been submitted as an update to Fedora 34. https://bodhi.fedoraproject.org/updates/FEDORA-2021-e5a17b617c FEDORA-2021-e20e9f81e4 has been submitted as an update to Fedora 33. https://bodhi.fedoraproject.org/updates/FEDORA-2021-e20e9f81e4 FEDORA-EPEL-2021-0fab0cd8cf has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2021-0fab0cd8cf FEDORA-2021-e5a17b617c has been pushed to the Fedora 34 testing repository. Soon you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2021-e5a17b617c` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2021-e5a17b617c See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates. FEDORA-2021-e20e9f81e4 has been pushed to the Fedora 33 testing repository. Soon you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2021-e20e9f81e4` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2021-e20e9f81e4 See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates. FEDORA-EPEL-2021-0fab0cd8cf has been pushed to the Fedora EPEL 7 testing repository. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2021-0fab0cd8cf See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates. FEDORA-EPEL-2021-a7cac9b814 has been pushed to the Fedora EPEL 8 testing repository. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2021-a7cac9b814 See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates. FEDORA-2021-e20e9f81e4 has been pushed to the Fedora 33 stable repository. If problem still persists, please make note of it in this bug report. FEDORA-2021-e5a17b617c has been pushed to the Fedora 34 stable repository. If problem still persists, please make note of it in this bug report. FEDORA-EPEL-2021-0fab0cd8cf has been pushed to the Fedora EPEL 7 stable repository. If problem still persists, please make note of it in this bug report. FEDORA-EPEL-2021-a7cac9b814 has been pushed to the Fedora EPEL 8 stable repository. If problem still persists, please make note of it in this bug report. |
Description of problem: afpcmd crashes # afpcmd --help Segmentation fault (core dumped) Version-Release number of selected component (if applicable): afpfs-ng-0.8.1-14 How reproducible: If it happens that some non-zero data is placed at certain memory location during the compilation then 100%. (gdb) bt #0 0x00007f80456d05a8 in __strncmp_sse2 () from /lib64/libc.so.6 #1 0x00007f8045724d6d in _getopt_internal_r () from /lib64/libc.so.6 #2 0x00007f8045725c8b in _getopt_internal () from /lib64/libc.so.6 #3 0x00007f8045725d13 in getopt_long () from /lib64/libc.so.6 #4 0x0000000000402451 in main () The main function in cmdline_main.c contains the following definition of the long_options array: struct option long_options[] = { {"recursive",1,0,'r'}, }; The manpage for getopt_long says the following about option structure: The last element of the array has to be filled with zeros. The correct definition is as follows: struct option long_options[] = { {"recursive",1,0,'r'}, {NULL,0,NULL,0} }; With this fix, the problem disappears.