object_key_iter() calls object_key_iter_typed() and then always tries to
dereference the string it returns, even if the call fails. The attached
patch fixes this.
This bug also affects trunk and flatiron, and maybe other branches too.
Chrissie
Index: objdb.c
===================================================================
--- objdb.c (revision 2943)
+++ objdb.c (working copy)
@@ -1539,8 +1539,10 @@
char *str;
ret = object_key_iter_typed (parent_object_handle,
(char**)key_name, value, value_len, &t);
- str = *key_name;
- *key_len = strlen(str);
+ if (!ret) {
+ str = *key_name;
+ *key_len = strlen(str);
+ }
return ret;
}
_______________________________________________
Openais mailing list
[email protected]
https://lists.linux-foundation.org/mailman/listinfo/openais