Bug 257317

Summary: FTPD.c va_list opened but not closed as detected by cppcheck
Product: Base System Reporter: Alan Shearer <sakison>
Component: binAssignee: Alan Somers <asomers>
Status: Closed FIXED    
Severity: Affects Many People CC: asomers
Priority: --- Flags: asomers: mfc-stable13+
asomers: mfc-stable12+
asomers: mfc-stable11+
Version: CURRENT   
Hardware: Any   
OS: Any   

Description Alan Shearer 2021-07-21 18:17:47 UTC
Howdy,

cppcheck-2.5 detected and error in libexec/ftpd/ftpd.c.

ftpd.c:3364:1: error: va_list 'ap' was opened but not closed by va_end().

Adding 'va_end(ap);' on line 3348 should resolve this.
Comment 1 Alan Shearer 2021-07-27 16:51:20 UTC
Pull request created.
https://github.com/freebsd/freebsd-src/pull/517
Comment 2 commit-hook freebsd_committer freebsd_triage 2021-07-27 18:18:42 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=674400eb20b65369a88b1cb778d729bc297832c9

commit 674400eb20b65369a88b1cb778d729bc297832c9
Author:     Alan Somers <asomers@FreeBSD.org>
AuthorDate: 2021-07-27 18:14:00 +0000
Commit:     Alan Somers <asomers@FreeBSD.org>
CommitDate: 2021-07-27 18:18:08 +0000

    ftpd: delete dead code

    Delete code killed by SVN r13139 in 1996.  Little chance that it would
    still compile today.

    PR:             257317
    Reported by:    Alan Shearer <sakison@gmail.com>
    MFC after:      2 weeks
    Sponsored by:   Axcient

 libexec/ftpd/extern.h |  3 ---
 libexec/ftpd/ftpd.c   | 49 -------------------------------------------------
 2 files changed, 52 deletions(-)
Comment 3 commit-hook freebsd_committer freebsd_triage 2021-08-22 21:25:54 UTC
A commit in branch stable/13 references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=2e6862b12b20ca62b53faf3899e39744c89a9a43

commit 2e6862b12b20ca62b53faf3899e39744c89a9a43
Author:     Alan Somers <asomers@FreeBSD.org>
AuthorDate: 2021-07-27 18:14:00 +0000
Commit:     Alan Somers <asomers@FreeBSD.org>
CommitDate: 2021-08-22 21:25:29 +0000

    ftpd: delete dead code

    Delete code killed by SVN r13139 in 1996.  Little chance that it would
    still compile today.

    PR:             257317
    Reported by:    Alan Shearer <sakison@gmail.com>
    Sponsored by:   Axcient

    (cherry picked from commit 674400eb20b65369a88b1cb778d729bc297832c9)

 libexec/ftpd/extern.h |  3 ---
 libexec/ftpd/ftpd.c   | 49 -------------------------------------------------
 2 files changed, 52 deletions(-)
Comment 4 commit-hook freebsd_committer freebsd_triage 2021-08-22 23:06:12 UTC
A commit in branch stable/12 references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=457516c6ab758abf47d22fcf520d82bf1be96a26

commit 457516c6ab758abf47d22fcf520d82bf1be96a26
Author:     Alan Somers <asomers@FreeBSD.org>
AuthorDate: 2021-07-27 18:14:00 +0000
Commit:     Alan Somers <asomers@FreeBSD.org>
CommitDate: 2021-08-22 23:05:32 +0000

    ftpd: delete dead code

    Delete code killed by SVN r13139 in 1996.  Little chance that it would
    still compile today.

    PR:             257317
    Reported by:    Alan Shearer <sakison@gmail.com>
    Sponsored by:   Axcient

    (cherry picked from commit 674400eb20b65369a88b1cb778d729bc297832c9)

 libexec/ftpd/extern.h |  3 ---
 libexec/ftpd/ftpd.c   | 49 -------------------------------------------------
 2 files changed, 52 deletions(-)
Comment 5 commit-hook freebsd_committer freebsd_triage 2021-08-22 23:22:15 UTC
A commit in branch stable/11 references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=60d0fd063d3497d94f4015fc407f86b13a74b2ff

commit 60d0fd063d3497d94f4015fc407f86b13a74b2ff
Author:     Alan Somers <asomers@FreeBSD.org>
AuthorDate: 2021-07-27 18:14:00 +0000
Commit:     Alan Somers <asomers@FreeBSD.org>
CommitDate: 2021-08-22 23:22:00 +0000

    ftpd: delete dead code

    Delete code killed by SVN r13139 in 1996.  Little chance that it would
    still compile today.

    PR:             257317
    Reported by:    Alan Shearer <sakison@gmail.com>
    Sponsored by:   Axcient

    (cherry picked from commit 674400eb20b65369a88b1cb778d729bc297832c9)

 libexec/ftpd/extern.h |  3 ---
 libexec/ftpd/ftpd.c   | 49 -------------------------------------------------
 2 files changed, 52 deletions(-)