[PATCH] Fix pointer arithmetic on a void*

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>From fe6cca9c0d650f6c13bdccaa99351af9d1259168 Mon Sep 17 00:00:00 2001
From: Samuel Tan <samueltan@xxxxxxxxxx>
Date: Thu, 5 Nov 2015 11:08:22 -0800
Subject: [PATCH] Fix pointer arithmetic on a void*

Fails to compile on x86 gcc due to pointer arithmetic on
a void*

Signed-off-by: Samuel Tan <samueltan@xxxxxxxxxx>
---
 wpa_supplicant/dbus/dbus_new_handlers.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/wpa_supplicant/dbus/dbus_new_handlers.c
b/wpa_supplicant/dbus/dbus_new_handlers.c
index a963e85..0504f31 100644
--- a/wpa_supplicant/dbus/dbus_new_handlers.c
+++ b/wpa_supplicant/dbus/dbus_new_handlers.c
@@ -435,7 +435,7 @@ dbus_bool_t
wpas_dbus_simple_array_property_getter(DBusMessageIter *iter,

        for (i = 0; i < array_len; i++) {
                if (!dbus_message_iter_append_basic(&array_iter, type,
-                                                   array + i * element_size)) {
+                                                   (char *)array + i
* element_size)) {
                        dbus_set_error(error, DBUS_ERROR_FAILED,
                                       "%s: failed to construct message 2.5",
                                       __func__);
-- 
2.6.0.rc2.230.g3dd15c0

_______________________________________________
Hostap mailing list
Hostap@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/hostap



[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux