strcpy(attribute_list[i], attr_list[i]); strcpy(values_list[i], val_list[i]);
values_list[i] = (char*) NPN_MemAlloc(strlen(val_list[i]) + 1); if (values_list[i] != NULL) strcpy(values_list[i], val_list[i]); }
CPluginInstancePeer::CPluginInstancePeer(NPP npp,                                         nsMIMEType typeString,                                          nsPluginMode type,                                         PRUint16 attr_cnt,                                          const char** attr_list,                                          const char** val_list)    : npp(npp), typeString(typeString), type(type), attribute_cnt(attr_cnt),    attribute_list(NULL), values_list(NULL){    // Set the reference count to 0.    NS_INIT_REFCNT();	attribute_list = (char**) NPN_MemAlloc(attr_cnt * sizeof(const char*));	values_list = (char**) NPN_MemAlloc(attr_cnt * sizeof(const char*));	for (int i=0; i < attribute_cnt; i++)   {		attribute_list[i] = (char*) NPN_MemAlloc(sizeof(char) + strlen(attr_list[i] + 1));		values_list[i] = (char*) NPN_MemAlloc(sizeof(char) + strlen(val_list[i] + 1));		strcpy(attribute_list[i], attr_list[i]);		strcpy(values_list[i], val_list[i]);	}}