diff options
author | Zbigniew Kosinski <z.kosinski@samsung.com> | 2012-10-15 06:26:30 +0000 |
---|---|---|
committer | Carsten Haitzler <raster@rasterman.com> | 2012-10-15 06:26:30 +0000 |
commit | 892f73dade6613e92c7722caf63b776cb5c4ec52 (patch) | |
tree | 1bc178f3f25eb6379b54eb7c2459e4c726c72d48 | |
parent | 6cd9536075d6f8d129e97dede984094a19735aa7 (diff) | |
download | eet-892f73dade6613e92c7722caf63b776cb5c4ec52.tar.gz |
From: Zbigniew Kosinski <z.kosinski@samsung.com>
Subject: Re: [E-devel] Add Null checking routine
I prepared patch - check eet file pointer parameter in
eet_identity_signature, eet_identity_x509 and eet_identity_sha1 functions.
Please take a look at attached files.
SVN revision: 77976
-rw-r--r-- | src/lib/eet_lib.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/lib/eet_lib.c b/src/lib/eet_lib.c index 98c9225..32b55cf 100644 --- a/src/lib/eet_lib.c +++ b/src/lib/eet_lib.c @@ -1595,6 +1595,9 @@ EAPI const void * eet_identity_x509(Eet_File *ef, int *der_length) { + if (eet_check_pointer(ef)) + return NULL; + if (!ef->x509_der) return NULL; @@ -1608,6 +1611,9 @@ EAPI const void * eet_identity_signature(Eet_File *ef, int *signature_length) { + if (eet_check_pointer(ef)) + return NULL; + if (!ef->signature) return NULL; @@ -1621,6 +1627,9 @@ EAPI const void * eet_identity_sha1(Eet_File *ef, int *sha1_length) { + if (eet_check_pointer(ef)) + return NULL; + if (!ef->sha1) ef->sha1 = eet_identity_compute_sha1(ef->data, ef->data_size, |