[gnome-keyring/dbus-api] [gp11] Don't fail when allocating zero length value.
- From: Stefan Walter <stefw src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gnome-keyring/dbus-api] [gp11] Don't fail when allocating zero length value.
- Date: Sun, 23 Aug 2009 01:59:18 +0000 (UTC)
commit 927bd8be0797f22f2c5edd813b862eb3be05dfb0
Author: Stef Walter <stef memberwebs com>
Date: Sun Aug 23 01:55:27 2009 +0000
[gp11] Don't fail when allocating zero length value.
When copying a zero length value, don't fail.
gp11/gp11-object.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/gp11/gp11-object.c b/gp11/gp11-object.c
index 76cac86..6f109bf 100644
--- a/gp11/gp11-object.c
+++ b/gp11/gp11-object.c
@@ -1077,7 +1077,7 @@ perform_get_attribute_data (GetAttributeData *args)
return rv;
/* Allocate memory for the value */
- args->result = (args->allocator) (NULL, attr.ulValueLen);
+ args->result = (args->allocator) (NULL, attr.ulValueLen ? attr.ulValueLen : 1);
g_assert (args->result);
attr.pValue = args->result;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]