[gimp] app: zero the reallocated keys and axes arrays in GimpDeviceInfo
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: zero the reallocated keys and axes arrays in GimpDeviceInfo
- Date: Sun, 6 Feb 2011 10:31:23 +0000 (UTC)
commit 012eb1dd930e125d89c33cbe903fcacce11c6997
Author: Michael Natterer <mitch gimp org>
Date: Sun Feb 6 02:36:24 2011 +0100
app: zero the reallocated keys and axes arrays in GimpDeviceInfo
app/widgets/gimpdeviceinfo.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/app/widgets/gimpdeviceinfo.c b/app/widgets/gimpdeviceinfo.c
index 6bb4f2e..d5c2322 100644
--- a/app/widgets/gimpdeviceinfo.c
+++ b/app/widgets/gimpdeviceinfo.c
@@ -302,6 +302,7 @@ gimp_device_info_set_property (GObject *object,
info->n_axes = n_device_values;
info->axes = g_renew (GdkAxisUse, info->axes, info->n_axes);
+ memset (info->axes, 0, info->n_axes * sizeof (GdkAxisUse));
}
for (i = 0; i < n_device_values; i++)
@@ -335,6 +336,7 @@ gimp_device_info_set_property (GObject *object,
info->n_keys = n_device_values;
info->keys = g_renew (GdkDeviceKey, info->keys, info->n_keys);
+ memset (info->keys, 0, info->n_keys * sizeof (GdkDeviceKey));
}
for (i = 0; i < n_device_values; i++)
@@ -605,6 +607,7 @@ gimp_device_info_set_device (GimpDeviceInfo *info,
info->n_axes = device->num_axes;
info->axes = g_renew (GdkAxisUse, info->axes, info->n_axes);
+ memset (info->axes, 0, info->n_axes * sizeof (GdkAxisUse));
for (i = 0; i < device->num_axes; i++)
gimp_device_info_set_axis_use (info, i,
@@ -612,6 +615,7 @@ gimp_device_info_set_device (GimpDeviceInfo *info,
info->n_keys = device->num_keys;
info->keys = g_renew (GdkDeviceKey, info->keys, info->n_keys);
+ memset (info->keys, 0, info->n_keys * sizeof (GdkDeviceKey));
for (i = 0; i < MIN (info->n_keys, device->num_keys); i++)
gimp_device_info_set_key (info, i,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]