All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] dbus-util: fix fixed-array file descriptor check
@ 2022-04-07 11:22 John Keeping
  2022-04-07 15:22 ` Denis Kenzior
  0 siblings, 1 reply; 2+ messages in thread
From: John Keeping @ 2022-04-07 11:22 UTC (permalink / raw)
  To: ell; +Cc: John Keeping

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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] dbus-util: fix fixed-array file descriptor check
  2022-04-07 11:22 [PATCH] dbus-util: fix fixed-array file descriptor check John Keeping
@ 2022-04-07 15:22 ` Denis Kenzior
  0 siblings, 0 replies; 2+ messages in thread
From: Denis Kenzior @ 2022-04-07 15:22 UTC (permalink / raw)
  To: John Keeping, ell

Hi John,

On 4/7/22 06:22, John Keeping wrote:
> 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(-)
> 

Nice catch.  Applied, thanks.

Regards,
-Denis


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-04-07 15:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-07 11:22 [PATCH] dbus-util: fix fixed-array file descriptor check John Keeping
2022-04-07 15:22 ` Denis Kenzior

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.