projects
/
platform
/
upstream
/
gcr.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b1c54fe
)
[gp11] Don't fail when allocating zero length value.
author
Stef Walter
<stef@memberwebs.com>
Sun, 23 Aug 2009 01:55:27 +0000
(
01:55
+0000)
committer
Stef Walter
<stef@memberwebs.com>
Sun, 23 Aug 2009 01:55:27 +0000
(
01:55
+0000)
When copying a zero length value, don't fail.
gp11/gp11-object.c
patch
|
blob
|
history
diff --git
a/gp11/gp11-object.c
b/gp11/gp11-object.c
index
3c92dc0
..
87a0fc8
100644
(file)
--- 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;