From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.2 required=3.0 tests=ALL_TRUSTED,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF shortcircuit=no autolearn=ham autolearn_force=no version=3.4.6 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id A6D0C1F47C for ; Fri, 13 Jan 2023 21:21:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=80x24.org; s=selector1; t=1673644907; bh=xpR4We+GZ427f2556h/jSPN49wRjERxhMtvJ79h6xFw=; h=From:To:Subject:Date:From; b=CCOmOYfctNNDcZDV5fPwFROrR2H1EC7QN2WavDCZtDJxCMnk6/7vktusaz0heeN7G L6K3+IqGTD1GaGqLo+97ZOPR8d31KCkTOnU+aP5JRMZFSO74S1S6zm7v1Sc4qUj4rI mehBGfgIvNSuvtd9ly03sns6qIxhi57h4oZNZGk4= From: Eric Wong To: mwrap-public@80x24.org Subject: [PATCH] fix uninitialized .dump_csv for Mwrap.dump Date: Fri, 13 Jan 2023 21:21:47 +0000 Message-Id: <20230113212147.3053117-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: .dump_csv was added to dump_args for the destructor, but not initialized properly for the Mwrap.dump API call. --- ext/mwrap/mwrap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/mwrap/mwrap.c b/ext/mwrap/mwrap.c index a45bb38..826ca92 100644 --- a/ext/mwrap/mwrap.c +++ b/ext/mwrap/mwrap.c @@ -27,7 +27,7 @@ extern VALUE __attribute__((weak)) rb_yield(VALUE); static VALUE mwrap_dump(int argc, VALUE *argv, VALUE mod) { VALUE io, min; - struct dump_arg a; + struct dump_arg a = { .dump_csv = false }; rb_io_t *fptr; rb_scan_args(argc, argv, "02", &io, &min);