summaryrefslogtreecommitdiff
path: root/src/lib/eet
diff options
context:
space:
mode:
authorZbigniew Kosinski <z.kosinski@samsung.com>2012-10-15 06:26:48 +0000
committerCarsten Haitzler <raster@rasterman.com>2012-10-15 06:26:48 +0000
commit2499d34087c81fd0e68d8768ffe5e2f829618bac (patch)
treeb59e9a519a9dcf334b24e7b91d1221afd5f01a72 /src/lib/eet
parent2e5c26b2e52aad5333a57268698ead058e6915ce (diff)
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: 77977
Diffstat (limited to 'src/lib/eet')
-rw-r--r--src/lib/eet/eet_lib.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/lib/eet/eet_lib.c b/src/lib/eet/eet_lib.c
index 226a357524..58086d552f 100644
--- a/src/lib/eet/eet_lib.c
+++ b/src/lib/eet/eet_lib.c
@@ -1598,6 +1598,9 @@ EAPI const void *
1598eet_identity_x509(Eet_File *ef, 1598eet_identity_x509(Eet_File *ef,
1599 int *der_length) 1599 int *der_length)
1600{ 1600{
1601 if (eet_check_pointer(ef))
1602 return NULL;
1603
1601 if (!ef->x509_der) 1604 if (!ef->x509_der)
1602 return NULL; 1605 return NULL;
1603 1606
@@ -1611,6 +1614,9 @@ EAPI const void *
1611eet_identity_signature(Eet_File *ef, 1614eet_identity_signature(Eet_File *ef,
1612 int *signature_length) 1615 int *signature_length)
1613{ 1616{
1617 if (eet_check_pointer(ef))
1618 return NULL;
1619
1614 if (!ef->signature) 1620 if (!ef->signature)
1615 return NULL; 1621 return NULL;
1616 1622
@@ -1624,6 +1630,9 @@ EAPI const void *
1624eet_identity_sha1(Eet_File *ef, 1630eet_identity_sha1(Eet_File *ef,
1625 int *sha1_length) 1631 int *sha1_length)
1626{ 1632{
1633 if (eet_check_pointer(ef))
1634 return NULL;
1635
1627 if (!ef->sha1) 1636 if (!ef->sha1)
1628 ef->sha1 = eet_identity_compute_sha1(ef->data, 1637 ef->sha1 = eet_identity_compute_sha1(ef->data,
1629 ef->data_size, 1638 ef->data_size,