| Summary: | pkg_add -r does a segmentation fault | ||
|---|---|---|---|
| Product: | Base System | Reporter: | cjuniet <cjuniet> |
| Component: | bin | Assignee: | Dag-Erling Smørgrav <des> |
| Status: | Closed FIXED | ||
| Severity: | Affects Only Me | ||
| Priority: | Normal | ||
| Version: | 4.1.1-STABLE | ||
| Hardware: | Any | ||
| OS: | Any | ||
Responsible Changed From-To: freebsd-bugs->des Dag-Erling already committed a fix (of a fix) in -current, I suppose this serves as a reminder to merge before 4.2-RELEASE State Changed From-To: open->closed Already fixed. |
On -STABLE, since revision 1.16.2.10, pkg_add -r does a segmentation fault if it is given any argument. In /usr/src/lib/libfetch/ftp.c, line 890 if (!strchr(flags, 'd') && (purl = _ftp_get_proxy()) != NULL) does a segmentation fault because flags is NULL. Fix: In /usr/src/lib/libfetch/ftp.c, lines 890 and 937 and 971 should be if (!(flags && strchr(flags, 'd')) && (purl = _ftp_get_proxy()) != NULL) or it should use CHECK_FLAG as in -CURRENT if (!CHECK_FLAG('d') && (purl = _ftp_get_proxy()) != NULL) How-To-Repeat: pkg_add -r foo