All of lore.kernel.org
 help / color / mirror / Atom feed
From: John Keeping <john@metanate.com>
To: ell@lists.linux.dev
Cc: John Keeping <john@metanate.com>
Subject: [PATCH] dbus-util: fix fixed-array file descriptor check
Date: Thu,  7 Apr 2022 12:22:12 +0100	[thread overview]
Message-ID: <20220407112212.3433989-1-john@metanate.com> (raw)

The code does not match the comment here since 'n' is the type code for
a signed 16-bit integer.  Change to use the correct type code for file
descriptors to match the intent expressed by the comment.
---
 ell/dbus-util.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ell/dbus-util.c b/ell/dbus-util.c
index cd8ba7f..b6220d2 100644
--- a/ell/dbus-util.c
+++ b/ell/dbus-util.c
@@ -716,7 +716,7 @@ bool _dbus1_iter_get_fixed_array(struct l_dbus_message_iter *iter,
 	size = get_basic_size(type);
 
 	/* Fail if the array is not a fixed size or contains file descriptors */
-	if (!size || type == 'n')
+	if (!size || type == 'h')
 		return false;
 
 	/*
-- 
2.35.1


             reply	other threads:[~2022-04-07 11:40 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-07 11:22 John Keeping [this message]
2022-04-07 15:22 ` [PATCH] dbus-util: fix fixed-array file descriptor check Denis Kenzior

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220407112212.3433989-1-john@metanate.com \
    --to=john@metanate.com \
    --cc=ell@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.