[Ltrace-devel] [PATCH v1 2/6] Allow extension tags in proc_find_dynamic_entry_addr
edgar.iglesias at gmail.com
edgar.iglesias at gmail.com
Tue Oct 9 12:50:31 UTC 2012
From: "Edgar E. Iglesias" <edgar at axis.com>
Remove the check for generic tags allowing the caller
to pass extension tags. I couldn't find a way to strictly
validate the tag nr, furthermore the seek tag is internally
generated so I simply dropped the check (beyond checking for
positive values).
One way possible could be to check for:
(tag >= DT_NULL && tag < DT_NUM) || (tag >= DT_LOOS && tag <= DT_HIPROC)
But I'm not sure thats OK.
Signed-off-by: Edgar E. Iglesias <edgar at axis.com>
---
sysdeps/linux-gnu/proc.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/sysdeps/linux-gnu/proc.c b/sysdeps/linux-gnu/proc.c
index 450177c..cc322fa 100644
--- a/sysdeps/linux-gnu/proc.c
+++ b/sysdeps/linux-gnu/proc.c
@@ -323,7 +323,7 @@ proc_find_dynamic_entry_addr(struct Process *proc, arch_addr_t src_addr,
{
debug(DEBUG_FUNCTION, "find_dynamic_entry()");
- if (ret == NULL || src_addr == 0 || d_tag < 0 || d_tag > DT_NUM)
+ if (ret == NULL || src_addr == 0 || d_tag < 0)
return -1;
int i = 0;
--
1.7.8.6
More information about the Ltrace-devel
mailing list