[PATCH 1/4] mark strings as examined & evaluated

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

 



evaluate_string() leaves the strings it creates as unexamined
& unevaluated. More exactly, they are examined and evaluated
(they have correct size & type) but not marked as such.

This doesn't seem to really matter but shows up when auditing
if classify_type() is always used on examined symbols.

So, mark the strings as examined and evaluated since their
size & type are known.

Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@xxxxxxxxx>
---
 evaluate.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/evaluate.c b/evaluate.c
index 34578be8a3bd..539ef8038587 100644
--- a/evaluate.c
+++ b/evaluate.c
@@ -110,6 +110,8 @@ static struct symbol *evaluate_string(struct expression *expr)
 	sym->ctype.modifiers = MOD_STATIC;
 	sym->ctype.base_type = array;
 	sym->initializer = initstr;
+	sym->examined = 1;
+	sym->evaluated = 1;
 
 	initstr->ctype = sym;
 	initstr->string = expr->string;
@@ -119,6 +121,8 @@ static struct symbol *evaluate_string(struct expression *expr)
 	array->ctype.alignment = 1;
 	array->ctype.modifiers = MOD_STATIC;
 	array->ctype.base_type = &char_ctype;
+	array->examined = 1;
+	array->evaluated = 1;
 	
 	addr->symbol = sym;
 	addr->ctype = &lazy_ptr_ctype;
-- 
2.24.0




[Index of Archives]     [Newbies FAQ]     [LKML]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Trinity Fuzzer Tool]

  Powered by Linux