summaryrefslogtreecommitdiff
path: root/src/lib/eet
diff options
context:
space:
mode:
authorCarsten Haitzler <raster@rasterman.com>2012-09-27 03:56:20 +0000
committerCarsten Haitzler <raster@rasterman.com>2012-09-27 03:56:20 +0000
commite0e6fd9201a3b13c4c9bf668c63599601d659c86 (patch)
tree2a64082cdb1e81e48183ade9bcf26670784f1d5e /src/lib/eet
parentfbfb3ec61af35c1850f2e5baec4a8fb3b1807e2c (diff)
port null check over to efl tree.
SVN revision: 77118
Diffstat (limited to 'src/lib/eet')
-rw-r--r--src/lib/eet/Eet.h3
-rw-r--r--src/lib/eet/eet_data.c10
2 files changed, 13 insertions, 0 deletions
diff --git a/src/lib/eet/Eet.h b/src/lib/eet/Eet.h
index 05f80e959f..fccfc1842b 100644
--- a/src/lib/eet/Eet.h
+++ b/src/lib/eet/Eet.h
@@ -1821,6 +1821,7 @@ typedef int (*Eet_Key_Password_Callback)(char *buffer, int size, int rwflag, voi
1821 * 1821 *
1822 * @see eet_identity_close() 1822 * @see eet_identity_close()
1823 * 1823 *
1824 * @warning You need to compile signature support in EET.
1824 * @since 1.2.0 1825 * @since 1.2.0
1825 * @ingroup Eet_Cipher_Group 1826 * @ingroup Eet_Cipher_Group
1826 */ 1827 */
@@ -1863,6 +1864,7 @@ eet_identity_set(Eet_File *ef,
1863 * @param key the handle to print. 1864 * @param key the handle to print.
1864 * @param out where to print. 1865 * @param out where to print.
1865 * 1866 *
1867 * @warning You need to compile signature support in EET.
1866 * @since 1.2.0 1868 * @since 1.2.0
1867 * @ingroup Eet_Cipher_Group 1869 * @ingroup Eet_Cipher_Group
1868 */ 1870 */
@@ -1922,6 +1924,7 @@ eet_identity_sha1(Eet_File *ef,
1922 * @param der_length The length the certificate. 1924 * @param der_length The length the certificate.
1923 * @param out where to print. 1925 * @param out where to print.
1924 * 1926 *
1927 * @warning You need to compile signature support in EET.
1925 * @since 1.2.0 1928 * @since 1.2.0
1926 * @ingroup Eet_Cipher_Group 1929 * @ingroup Eet_Cipher_Group
1927 */ 1930 */
diff --git a/src/lib/eet/eet_data.c b/src/lib/eet/eet_data.c
index d06d3eaceb..9c9dc8ceec 100644
--- a/src/lib/eet/eet_data.c
+++ b/src/lib/eet/eet_data.c
@@ -2149,6 +2149,8 @@ eet_data_write_cipher(Eet_File *ef,
2149 int size; 2149 int size;
2150 int val; 2150 int val;
2151 2151
2152 EINA_SAFETY_ON_NULL_RETURN_VAL(edd, 0);
2153
2152 ed = eet_dictionary_get(ef); 2154 ed = eet_dictionary_get(ef);
2153 2155
2154 data_enc = _eet_data_descriptor_encode(ed, edd, data, &size); 2156 data_enc = _eet_data_descriptor_encode(ed, edd, data, &size);
@@ -4737,6 +4739,8 @@ eet_data_descriptor_decode_cipher(Eet_Data_Descriptor *edd,
4737 Eet_Free_Context context; 4739 Eet_Free_Context context;
4738 unsigned int deciphered_len = size_in; 4740 unsigned int deciphered_len = size_in;
4739 4741
4742 EINA_SAFETY_ON_NULL_RETURN_VAL(edd, NULL);
4743
4740 if (cipher_key && data_in) 4744 if (cipher_key && data_in)
4741 if (eet_decipher(data_in, size_in, cipher_key, 4745 if (eet_decipher(data_in, size_in, cipher_key,
4742 strlen(cipher_key), &deciphered, &deciphered_len)) 4746 strlen(cipher_key), &deciphered, &deciphered_len))
@@ -4938,6 +4942,8 @@ eet_data_descriptor_encode_cipher(Eet_Data_Descriptor *edd,
4938 unsigned int ciphered_len = 0; 4942 unsigned int ciphered_len = 0;
4939 int size; 4943 int size;
4940 4944
4945 EINA_SAFETY_ON_NULL_RETURN_VAL(edd, NULL);
4946
4941 ret = _eet_data_descriptor_encode(NULL, edd, data_in, &size); 4947 ret = _eet_data_descriptor_encode(NULL, edd, data_in, &size);
4942 if (cipher_key && ret) 4948 if (cipher_key && ret)
4943 { 4949 {
@@ -4983,6 +4989,8 @@ eet_data_xattr_cipher_get(const char *filename,
4983 void *ret; 4989 void *ret;
4984 ssize_t size; 4990 ssize_t size;
4985 4991
4992 EINA_SAFETY_ON_NULL_RETURN_VAL(edd, NULL);
4993
4986 blob = eina_xattr_get(filename, attribute, &size); 4994 blob = eina_xattr_get(filename, attribute, &size);
4987 if (!blob) return NULL; 4995 if (!blob) return NULL;
4988 4996
@@ -5004,6 +5012,8 @@ eet_data_xattr_cipher_set(const char *filename,
5004 int size; 5012 int size;
5005 Eina_Bool ret; 5013 Eina_Bool ret;
5006 5014
5015 EINA_SAFETY_ON_NULL_RETURN_VAL(edd, EINA_FALSE);
5016
5007 blob = eet_data_descriptor_encode_cipher(edd, data, cipher_key, &size); 5017 blob = eet_data_descriptor_encode_cipher(edd, data, cipher_key, &size);
5008 if (!blob) return EINA_FALSE; 5018 if (!blob) return EINA_FALSE;
5009 5019