Assertion when trying to copy a PList::Dictionary
Reported by teuf | 2010-10-03 10:37:35 UTC
The following test case unexpectedly stops with an exception:
include
include <plist/plist++.h>
int main()
{
PList::Dictionary a;
PList::String b("Hello");
PList::String c("Hi!");
PList::Dictionary d;
a.Insert("Key", &b);
a.Insert("Another Key", &c);
std::cout << a.ToXml() << std::endl;
d.Insert("dictionary", &a); //CRAAAAAAAAASH!
std::cout << d.ToXml() << std::endl;
return 0;
}
/* Output:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<key>Key</key>
<string>Hello</string>
<key>Another Key</key>
<string>Hi!</string>
terminate called after throwing an instance of 'std::logic_error'
what(): basic_string::_S_construct NULL not valid
*/
Comments and changes to this ticket
-

teuf 2010-10-03 10:38:14 UTC
- Tag changed from libplist to libplist, patch
-

Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป
A project around supporting the iPhone in Linux.
See http://libimobiledevice.org