Bug 650119
| Summary: | rexec gives error "can't allocate memory!" if you specify the -p parameter | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Marcel van Groenigen <pfismvg> |
| Component: | rsh | Assignee: | Adam Tkac <atkac> |
| Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
| Severity: | medium | Docs Contact: | |
| Priority: | low | ||
| Version: | 14 | CC: | atkac, ovasik |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | x86_64 | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | rsh-0.17-63.fc14 | Doc Type: | Bug Fix |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2010-11-16 23:16:35 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
rsh-0.17-63.fc14 has been submitted as an update for Fedora 14. https://admin.fedoraproject.org/updates/rsh-0.17-63.fc14 rsh-0.17-63.fc14 has been pushed to the Fedora 14 testing repository. If problems still persist, please make note of it in this bug report. If you want to test the update, you can install it with su -c 'yum --enablerepo=updates-testing update rsh'. You can provide feedback for this update here: https://admin.fedoraproject.org/updates/rsh-0.17-63.fc14 rsh-0.17-63.fc14 has been pushed to the Fedora 14 stable repository. If problems still persist, please make note of it in this bug report. |
As soon as you run rexec using the -p param, the program crashes. # ./rexec -p test -l test localhost ls ./rexec: can't allocate memory! If I look in the source rexec.c on line 318 there is the following statement *passwd = malloc((char *)malloc((passlen+1)*sizeof(char))); I dont know much about C, so I may have this completely wrong. but here it allocates memory malloc((passlen+1)*sizeof(char)) and then take the pointer to that memory and use that pointer as a size to allocate more memory :)? That line probably should be: *passwd = malloc((passlen+1)*sizeof(char))); If I recompile after this change all looks OK, and rexec works great. this problem seems to exist in fedora 13 and fedora 14