Protect against bogus string offsets
Modified: trunk/reactos/tools/rsym.c
_____
Modified: trunk/reactos/tools/rsym.c
--- trunk/reactos/tools/rsym.c 2005-02-18 18:28:49 UTC (rev 13634)
+++ trunk/reactos/tools/rsym.c 2005-02-18 20:19:49 UTC (rev 13635)
@@ -442,7 +442,8 @@
{
case N_SO:
Name = (char *) StabStringsBase + StabEntry[i].n_strx;
- if ('\0' == *Name || '/' == Name[strlen(Name) - 1]
+ if (StabStringsLength < StabEntry[i].n_strx
+ ||'\0' == *Name || '/' == Name[strlen(Name) - 1]
|| '\\' == Name[strlen(Name) - 1]
|| StabEntry[i].n_value < ImageBase)
{