prop = xml_get_prop(node, "NroArtĂculo");
tmp[count-1].numero = atoi(prop);
xmlFree(prop);
- strcpy(tmp[count-1].cv, prop = xml_get_prop(node, "CV")); xmlFree(prop);
- strcpy(tmp[count-1].pvu, prop = xml_get_prop(node, "PVU")); xmlFree(prop);
+ strncpy(tmp[count-1].cv, prop = xml_get_prop(node, "CV"), 8); xmlFree(prop);
+ tmp[count-1].cv[8] = '\0';
+ strncpy(tmp[count-1].pvu, prop = xml_get_prop(node, "PVU"), 8); xmlFree(prop);
+ tmp[count-1].pvu[8] = '\0';
}
}
node = node->next;
prop = xml_get_prop(node, "NroArtĂculo");
tmp[count].numero = atoi(prop);
xmlFree(prop);
- strcpy(tmp[count].cv, prop = xml_get_prop(node, "CV")); xmlFree(prop);
- strcpy(tmp[count].pvu, prop = xml_get_prop(node, "PVU")); xmlFree(prop);
+ strncpy(tmp[count].cv, prop = xml_get_prop(node, "CV"), 8); xmlFree(prop);
+ tmp[count-1].cv[8] = '\0';
+ strncpy(tmp[count].pvu, prop = xml_get_prop(node, "PVU"), 8); xmlFree(prop);
+ tmp[count-1].pvu[8] = '\0';
count++;
}
}