-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch '214-do-not-return-local-stack-address'
Use static string object for keeping the c_str message for the caller. Strings collection used as an alternative to memory leaks done via strdup(). To add, TargetBufferSmallerThanSource Exception should never happen in a correctly written library client, as this completely depends on the implementation and not on the communication with the device Downside: if missed and when occurring too often, the memory taken by the exception messages can take too much memory. Potential improvement: replace std::vector with a kind of a ring buffer, or add simple wrapping logic over it. This should avoid breaking ABI by using static memory. Note: there might be multiple exceptions' strings collections (for each compilation unit including this header). Correct that for libnitrokey 4, by keeping string as a member of the exception. Fixes #214 Fixes #217
- Loading branch information
Showing
3 changed files
with
13 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters