[xmlsec] xmlSecPtrListEnsureSize failing

Rob Richards rrichards at ctindustries.net
Sun Dec 28 10:03:13 PST 2003


Running under windows: xmlsec 1.2.2 and libxml 2.5.11, the calls to
xmlSecPtrListEnsureSize fail as the data member of the list is always null,
which in turn causes xmlSecInit() to fail (xmlSecIOInit() never succeeds and
xmlSecInit unltimately fails calling xmlSecKeyDataIdsInit()).

I see that list.c hasnt changed in about 5 months or so, so not sure why I
am the only one running into this issue. Anyways, by changing the xmlRealloc
call in xmlSecPtrListEnsureSize as follows seems to resolve this issue for
me:

if (list->data) {
    newData = (xmlSecPtr*)xmlRealloc(list->data, sizeof(xmlSecPtr) *
newSize);
} else {
    newData = (xmlSecPtr*)xmlMalloc(sizeof(xmlSecPtr) * newSize);
}

Am I missing something that wouldnt require the above as I see the call to
xmlFree(list->data) in xmlSecPtrListEmpty, but dont see where list->data is
actually alloc'd.

Thanks,

Rob





More information about the xmlsec mailing list