git: 312510880e2e - releng/13.0 - bc: Fix stack handling in the "P" command implementation

Mark Johnston markj at FreeBSD.org
Wed May 26 20:37:53 UTC 2021


The branch releng/13.0 has been updated by markj:

URL: https://cgit.FreeBSD.org/src/commit/?id=312510880e2e638a1fe68771c40392f4237582f3

commit 312510880e2e638a1fe68771c40392f4237582f3
Author:     Mark Johnston <markj at FreeBSD.org>
AuthorDate: 2021-05-26 20:11:57 +0000
Commit:     Mark Johnston <markj at FreeBSD.org>
CommitDate: 2021-05-26 20:32:40 +0000

    bc: Fix stack handling in the "P" command implementation
    
    Approved by:    so
    Security:       EN-21:16.bc
    Submitted by:   se
---
 contrib/bc/src/program.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/contrib/bc/src/program.c b/contrib/bc/src/program.c
index d4e386d4ac1b..14a886d0daa3 100644
--- a/contrib/bc/src/program.c
+++ b/contrib/bc/src/program.c
@@ -1440,6 +1440,8 @@ static void bc_program_printStream(BcProgram *p) {
 		size_t idx = (r->t == BC_RESULT_STR) ? r->d.loc.loc : n->scale;
 		bc_program_printChars(*((char**) bc_vec_item(p->strs, idx)));
 	}
+
+	bc_vec_pop(&p->results);
 }
 
 static void bc_program_nquit(BcProgram *p, uchar inst) {


More information about the dev-commits-src-all mailing list