Opened 20 years ago
Closed 20 years ago
#2179 closed defect (fixed)
Update to ed(1) patch via Gentoo
| Reported by: | Tyler Berry | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | 6.2.0 |
| Component: | BOOK | Version: | SVN |
| Severity: | medium | Keywords: | |
| Cc: |
Description
The patch LFS uses to replace an insecure mktemp(3) call in ed with mkstemp(3) was adopted by Gentoo, who after some poking at it managed to get it to produce broken output files. http://bugs.gentoo.org/show_bug.cgi?id=73858
Short version: mkstemp returns an open file descriptor. ed wants a FILE *, so the LFS patch calls fopen(3) on the filename; this re-opens the file and the previous open due to the mkstemp is never closed. The attached patch, which replaces LFS's current patch, uses fdopen(3) instead to convert the open file descriptor to a FILE *.
Attachments (1)
Change History (2)
by , 20 years ago
| Attachment: | ed-0.2-mkstemp-2.patch added |
|---|
comment:1 by , 20 years ago
| Resolution: | → fixed |
|---|---|
| Status: | new → closed |
Note:
See TracTickets
for help on using tickets.

Updated the patch and inserted new patch in the book at revision 6397.