Ian fixed this a while back, but the bug never got closed for some reason.
dpkg (1.14.5ubuntu15) gutsy; urgency=low
* Bugfixes to fd cleanup handling:
- avoid closing fsys tarfile pipe twice even in normal
operation - normally EBADF but might sometimes close some other
desired fd and cause hideous doom. (LP: #137191.)
- avoid duplicate attempts to [f]close in obscure error
situations which might conceiveably close wrong fds
- cast &fd to void* when passing to push_cleanup cu_closefd
- fix parse.c:parsedb to use ehflag_normaltidy in a sane way
- when passing &fd to push_cleanup cu_closefd, make fd always static
* Bugfix in trigger deferred file processing: reset lexer start state
when calling yyrestart (has no effect except after parsing/reading
errors in the deferred file).
* Fix some error handling bugs in tarfn.c:
- Avoid freeing uninitialised h.[Link]Name (can cause crash if .deb
becomes unreadable while we start up). (LP: #138887.)
- Use m_malloc instead of malloc (and ditch ad-hoc error handling).
-- Ian Jackson <email address hidden> Thu, 20 Sep 2007 18:12:20 +0100
Ian fixed this a while back, but the bug never got closed for some reason.
dpkg (1.14.5ubuntu15) gutsy; urgency=low
* Bugfixes to fd cleanup handling:
- avoid closing fsys tarfile pipe twice even in normal
operation - normally EBADF but might sometimes close some other
desired fd and cause hideous doom. (LP: #137191.)
- avoid duplicate attempts to [f]close in obscure error
situations which might conceiveably close wrong fds
- cast &fd to void* when passing to push_cleanup cu_closefd
- fix parse.c:parsedb to use ehflag_normaltidy in a sane way
- when passing &fd to push_cleanup cu_closefd, make fd always static
* Bugfix in trigger deferred file processing: reset lexer start state
when calling yyrestart (has no effect except after parsing/reading
errors in the deferred file).
* Fix some error handling bugs in tarfn.c:
- Avoid freeing uninitialised h.[Link]Name (can cause crash if .deb
becomes unreadable while we start up). (LP: #138887.)
- Use m_malloc instead of malloc (and ditch ad-hoc error handling).
-- Ian Jackson <email address hidden> Thu, 20 Sep 2007 18:12:20 +0100