Actions
Bug #5983
closed![Author: Andreas Oetjen](https://www.gravatar.com/avatar/cd0a91be75f1c179d1f2dcbaba6cf585?rating=PG&size=50&default=https%3A%2F%2Fassets.plan.io%2Fimages%2Fdefault_avatar.png)
![Assignee: O'Neil Delpratt](https://www.gravatar.com/avatar/a0bc1766b412d8fecb16f7d304916359?rating=PG&size=22&default=https%3A%2F%2Fassets.plan.io%2Fimages%2Fdefault_avatar.png)
Saxon.C.API/SaxonApiException.cpp calculates wrong strlen
Start date:
2023-04-19
Due date:
% Done:
100%
Estimated time:
Applies to branch:
Fix Committed on Branch:
Fixed in Maintenance Release:
Found in version:
12.1
Fixed in version:
12.2
SaxonC Languages:
SaxonC Platforms:
SaxonC Architecture:
Description
Lines 86ff:
if(sysId != nullptr) {
//systemId = (char *)sysId;
size_t destination_size = strlen(ec);
systemId = (char *)malloc(sizeof(char)*destination_size);
snprintf(systemId, destination_size, "%s", sysId);
} else {
systemId = nullptr;
}
here strlen(ec) is wrong, it should be strlen(sysId), because this is what snprintf uses.
Updated by O'Neil Delpratt almost 2 years ago
- Status changed from New to Resolved
- % Done changed from 0 to 100
Thanks for spotting this typo. Patched in the repo for the next maintenance release.
Updated by O'Neil Delpratt almost 2 years ago
- Status changed from Resolved to Closed
- Fixed in version set to 12.2
Bug fix applied in the SaxonC 12.2 maintenance release.
Please register to edit this issue
Actions