diff options
| author | Martin Willi <martin@revosec.ch> | 2015-03-31 17:25:05 +0200 |
|---|---|---|
| committer | Martin Willi <martin@revosec.ch> | 2015-04-15 13:44:40 +0200 |
| commit | f206bb74449f46c0558993f2b779ffa096fb32f2 (patch) | |
| tree | 9b7a2e4058621aea4dd3184d78c47a39f6520bf1 /src/libcharon/plugins/eap_simaka_sql/test.sql | |
| parent | edab6c658c7d0c2d21877bf7aaad218c4b1c8167 (diff) | |
| download | strongswan-f206bb74449f46c0558993f2b779ffa096fb32f2.tar.bz2 strongswan-f206bb74449f46c0558993f2b779ffa096fb32f2.tar.xz | |
utils: Add malloc/free wrappers returning aligned data
While we could use posix_memalign(3), that is not fully portable. Further, it
might be difficult on some platforms to properly catch it in leak-detective,
which results in invalid free()s when releasing such memory.
We instead use a simple wrapper, which allocates larger data, and saves the
padding size in the allocated header. This requires that memory is released
using a dedicated function.
To reduce the risk of invalid free() when working on corrupted data, we fill up
all the padding with the padding length, and verify it during free_align().
Diffstat (limited to 'src/libcharon/plugins/eap_simaka_sql/test.sql')
0 files changed, 0 insertions, 0 deletions
