Fix bugs preventing wrap layer propmting from working.
authorStef Walter <stef@memberwebs.com>
Sun, 6 Jun 2010 19:51:58 +0000 (19:51 +0000)
committerStef Walter <stef@memberwebs.com>
Tue, 8 Jun 2010 15:59:24 +0000 (15:59 +0000)
 * Standard way to get object path from GkdSecretDispatch
 * Lots of minor little tweaks and bugs.

gp11/gp11-attributes.c

index 35d42be..f99b13b 100644 (file)
@@ -59,8 +59,8 @@ attribute_init (GP11Attribute *attr, gulong attr_type,
        memset (attr, 0, sizeof (GP11Attribute));
        attr->type = attr_type;
        attr->length = length;
-       if (value && length) {
-               attr->value = (allocator) (NULL, length);
+       if (value) {
+               attr->value = (allocator) (NULL, length ? length : 1);
                g_assert (attr->value);
                memcpy (attr->value, value, length);
        }