dbghelp: Fix stabs_pts_read_type_def() for when typename is NULL
Eric Pouech
eric.pouech at orange.fr
Sun Jun 22 01:49:48 CDT 2008
Andrew Talbot a écrit :
> Changelog:
> dbghelp: Fix stabs_pts_read_type_def() for when typename is NULL.
>
> diff --git a/dlls/dbghelp/stabs.c b/dlls/dbghelp/stabs.c
> index d550633..3c69eec 100644
> --- a/dlls/dbghelp/stabs.c
> +++ b/dlls/dbghelp/stabs.c
> @@ -896,10 +896,10 @@ static int stabs_pts_read_type_def(struct ParseTypedefData* ptd, const char* typ
> * removed
> */
> l1 = strlen(udt->hash_elt.name);
> - l2 = strlen(typename);
> - if (l1 > l2 || strcmp(udt->hash_elt.name, typename + l2 - l1))
> + l2 = typename ? strlen(typename) : 0;
> + if (l1 > l2 || (typename && strcmp(udt->hash_elt.name, typename + l2 - l1)))
> ERR("Forward declaration name mismatch %s <> %s\n",
> - udt->hash_elt.name, typename);
> + udt->hash_elt.name, typename ? typename : "(null)");
> new_dt = &udt->symt;
> }
> PTS_ABORTIF(ptd, stabs_pts_read_aggregate(ptd, udt) == -1);
> @@ -1003,7 +1003,7 @@ static int stabs_pts_read_type_def(struct ParseTypedefData* ptd, const char* typ
>
> *stabs_find_ref(filenr1, subnr1) = *ret_dt = new_dt;
>
> - TRACE("Adding (%ld,%ld) %s\n", filenr1, subnr1, typename);
> + TRACE("Adding (%ld,%ld) %s\n", filenr1, subnr1, typename ? typename : "(null)");
>
> return 0;
> }
>
>
>
>
>
looks like a bit strange to me that you get a null typename here
can you send me the DLL/.so file on which you get the seg fault
A+
--
Eric Pouech
"The problem with designing something completely foolproof is to underestimate the ingenuity of a complete idiot." (Douglas Adams)
More information about the wine-devel
mailing list