Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12-SP1:GA
gnome-keyring
gnome-keyring-bsc961271-secmem-mismatch.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File gnome-keyring-bsc961271-secmem-mismatch.patch of Package gnome-keyring
diff --git a/pkcs11/gnome2-store/gkm-gnome2-file.c b/pkcs11/gnome2-store/gkm-gnome2-file.c index 582366f..54e3606 100644 --- a/pkcs11/gnome2-store/gkm-gnome2-file.c +++ b/pkcs11/gnome2-store/gkm-gnome2-file.c @@ -362,31 +362,23 @@ create_cipher (GkmSecret *login, int calgo, int halgo, const guchar *salt, n_block = gcry_cipher_get_algo_blklen (calgo); g_return_val_if_fail (n_block, FALSE); - /* Allocate memory for the keys */ - key = gcry_malloc_secure (n_key); - g_return_val_if_fail (key, FALSE); - iv = g_malloc0 (n_block); - password = gkm_secret_get_password (login, &n_password); if (!egg_symkey_generate_simple (calgo, halgo, password, n_password, - salt, n_salt, iterations, &key, &iv)) { - gcry_free (key); - g_free (iv); + salt, n_salt, iterations, &key, &iv)) return FALSE; - } gcry = gcry_cipher_open (cipher, calgo, GCRY_CIPHER_MODE_CBC, 0); if (gcry) { g_warning ("couldn't create cipher context: %s", gcry_strerror (gcry)); - gcry_free (key); + egg_secure_free (key); g_free (iv); return FALSE; } gcry = gcry_cipher_setkey (*cipher, key, n_key); g_return_val_if_fail (!gcry, FALSE); - gcry_free (key); + egg_secure_free (key); gcry = gcry_cipher_setiv (*cipher, iv, n_block); g_return_val_if_fail (!gcry, FALSE);
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor