[PATCH 4/5] libsepol: drop superfluous check

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



str_read() internally performs a sanity length check.

Signed-off-by: Christian Göttsche <cgzones@xxxxxxxxxxxxxx>
---
 libsepol/src/policydb.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/libsepol/src/policydb.c b/libsepol/src/policydb.c
index 552eb77a..e1f8bb06 100644
--- a/libsepol/src/policydb.c
+++ b/libsepol/src/policydb.c
@@ -3560,8 +3560,6 @@ static int filename_trans_rule_read(policydb_t *p, avrule_t **r,
 			return -1;
 
 		len = le32_to_cpu(buf[0]);
-		if (zero_or_saturated(len))
-			return -1;
 
 		rc = str_read(&cur->object_name, fp, len);
 		if (rc)
-- 
2.40.1




[Index of Archives]     [Selinux Refpolicy]     [Linux SGX]     [Fedora Users]     [Fedora Desktop]     [Yosemite Photos]     [Yosemite Camping]     [Yosemite Campsites]     [KDE Users]     [Gnome Users]

  Powered by Linux