projects
/
platform
/
upstream
/
cryptsetup.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
synced to Wiki
[platform/upstream/cryptsetup.git]
/
lib
/
volumekey.c
diff --git
a/lib/volumekey.c
b/lib/volumekey.c
index
d281565
..
4671771
100644
(file)
--- a/
lib/volumekey.c
+++ b/
lib/volumekey.c
@@
-15,7
+15,7
@@
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
- * Foundation, Inc., 5
9 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * Foundation, Inc., 5
1 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include <string.h>
*/
#include <string.h>
@@
-33,6
+33,8
@@
struct volume_key *crypt_alloc_volume_key(unsigned keylength, const char *key)
vk->keylength = keylength;
if (key)
memcpy(&vk->key, key, keylength);
vk->keylength = keylength;
if (key)
memcpy(&vk->key, key, keylength);
+ else
+ memset(&vk->key, 0, keylength);
return vk;
}
return vk;
}