dbghelp: Fix stabs_pts_read_type_def() for when typename is NULL

Eric Pouech eric.pouech at orange.fr
Sun Jun 22 08:01:15 CDT 2008


Andrew Talbot a écrit :
> Eric Pouech wrote:
>
>   
>> 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+
>>
>>     
>
> No known segfaults; I'm just doing static analysis. But
> stabs_pts_read_type_def() is called several times within stabs.c passing
> NULL as a typename argument: e.g., line 494:
>
>     PTS_ABORTIF(ptd, stabs_pts_read_type_def(ptd, NULL, &ref) == -1);
>
> And, with case 'u' (i.e., *ptd->ptr == 'u') and udt != NULL, it would be
> passed to strlen(). I didn't establish whether this will ever occur with
> typename == NULL, I just sought to make the function more bullet proof.
>
>   
this code path shouldn't need to be protected
however the last trace should be protected (and debugstr_a is a better 
choice than testing for a null string)
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