strongswan.org
Wiki/Project Management
Downloads
Gitweb
projects
/
strongswan.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8d34e55
)
pts: Make sure the complete AIK blob has been read
author
Tobias Brunner
<tobias@strongswan.org>
Wed, 9 Apr 2014 15:47:32 +0000
(17:47 +0200)
committer
Tobias Brunner
<tobias@strongswan.org>
Wed, 9 Apr 2014 15:47:32 +0000
(17:47 +0200)
src/libpts/pts/pts.c
patch
|
blob
|
history
diff --git
a/src/libpts/pts/pts.c
b/src/libpts/pts/pts.c
index
8699282
..
3ab9b92
100644
(file)
--- a/
src/libpts/pts/pts.c
+++ b/
src/libpts/pts/pts.c
@@
-393,7
+393,7
@@
static void load_aik_blob(private_pts_t *this)
fseek(fp, 0L, SEEK_SET);
this->aik_blob = chunk_alloc(aikBlobLen);
- if (fread(this->aik_blob.ptr, 1, aikBlobLen, fp))
+ if (fread(this->aik_blob.ptr, 1, aikBlobLen, fp)
== aikBlobLen
)
{
DBG2(DBG_PTS, "loaded AIK Blob from '%s'", blob_path);
DBG3(DBG_PTS, "AIK Blob: %B", &this->aik_blob);
@@
-401,6
+401,7
@@
static void load_aik_blob(private_pts_t *this)
else
{
DBG1(DBG_PTS, "unable to read AIK Blob file '%s'", blob_path);
+ chunk_free(&this->aik_blob);
}
fclose(fp);
return;