From nobody Sun Feb 8 21:29:12 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1638182243; cv=none; d=zohomail.com; s=zohoarc; b=HASKEHJwHaKbxP8YcyOytpXMorbOv0RLdPjWHJqn4mFc6LvjHGXTXd6qwPa3RsF4L8Pr3FrYuwNcCuSJnWVI6Ls0jeoA0b/Q4cE7aChYZSa4hjSBCVt7nSm3MHk71fSUuMED6xyC2A6TvDKy23HrJ22PdPRArJmogOnxvTe3Dl4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1638182243; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=lc9ezkL9LIrmMIQghjMVPRgVDy8HonhQ2UcLzUnknrU=; b=Ww+1PiVAhcjaIds1vsnjLjv8ozb02laV1xxdiIm1zQd0W78C0JTDu8quLmY+atjtiHun7hoZA8sst3wwFsZ3h5s4KXooKmW4kcNpCzlJg5jmyj5dImz9r8y8Srr1KkAOw5/a/R77QFEk9KpDNHUhxnJTKHx56ueEXXJDV+lk0ts= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.zohomail.com with SMTPS id 1638182243088779.6183826423116; Mon, 29 Nov 2021 02:37:23 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-359-cobSY7FjP9qsvf2AQJIVYQ-1; Mon, 29 Nov 2021 05:37:18 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id B48E2835E22; Mon, 29 Nov 2021 10:37:13 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 578CB10023B8; Mon, 29 Nov 2021 10:37:13 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 4F20B1809CB8; Mon, 29 Nov 2021 10:37:12 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 1ATAZxhi013883 for ; Mon, 29 Nov 2021 05:35:59 -0500 Received: by smtp.corp.redhat.com (Postfix) id 8A446196E5; Mon, 29 Nov 2021 10:35:59 +0000 (UTC) Received: from maggie.redhat.com (unknown [10.43.2.64]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1364319741 for ; Mon, 29 Nov 2021 10:35:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1638182242; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=lc9ezkL9LIrmMIQghjMVPRgVDy8HonhQ2UcLzUnknrU=; b=e3QUIiKgF9fSDOkVuTrSwfVuYeYnUBQ2PREqTXAfwrCWdZ0tUDVxuiJ5tp6RT1jQ6ZlG0O 3G0UUMMJAow8ywjblAT66rGY+VgWdrLaV6o57bTTIBaaZ1DpoGxzIcl79nb1bDQp4ClIZr vAz4QgQv6ofg0vetep/bZV5dPsV+ivc= X-MC-Unique: cobSY7FjP9qsvf2AQJIVYQ-1 From: Michal Privoznik To: libvir-list@redhat.com Subject: [PATCH 2/2] wireshark: Drop needless comment in dissect_xdr_bytes() Date: Mon, 29 Nov 2021 11:35:50 +0100 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1638182245191100001 Content-Type: text/plain; charset="utf-8" In the dissect_xdr_bytes() there's a comment that the string allocated by xdr_bytes() can't be freed using xdr_free(). Well, that is expected because xdr_bytes() used plain calloc() AND the string is not an XDR struct but plain 'char *' type. Passing it to xdr_free() must result in weird things happening. Signed-off-by: Michal Privoznik --- tools/wireshark/src/packet-libvirt.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/tools/wireshark/src/packet-libvirt.c b/tools/wireshark/src/pac= ket-libvirt.c index cb922b8070..eeacbcdf0e 100644 --- a/tools/wireshark/src/packet-libvirt.c +++ b/tools/wireshark/src/packet-libvirt.c @@ -195,8 +195,6 @@ dissect_xdr_bytes(tvbuff_t *tvb, proto_tree *tree, XDR = *xdrs, int hf, const char *s =3D tvb_bytes_to_str(wmem_packet_scope(), tvb, start= , len); =20 proto_tree_add_bytes_format_value(tree, hf, tvb, start, len, NULL,= "%s", s); - /* Seems I can't call xdr_free() for this case. - It will raises SEGV by referencing out of bounds call stack */ free(val); return TRUE; } else { --=20 2.32.0