winetests: new addition

Ferenc Wagner wferi at afavant.elte.hu
Sun Oct 19 12:05:03 CDT 2003


"Dimitrie O. Paun" <dpaun at rogers.com> writes:

> On October 18, 2003 07:04 am, Ferenc Wagner wrote:
>
>>> +    char line[512], *cmd;
>>
>> Fixed size buffers are wrong...
>
> Oh come on, it's just a temp buffer to copy stuff through.
> It introduces no limitation.

Sorry, I was too quick here.

>>> +	while (fgets( line, sizeof(line), fp ))
>>> +	    fprintf( logfp, "%s", line );

But here is the reason: I was sure fgets was deprecated.
For whole bunch of libc input functions this is for possible
buffer overruns, but not for fgets.  The problem here is
that you can not tell a NUL in the input stream.

>>> +    if (!(fp = fopen( logfile, "w" ))) fatal("Could not open log
>>> file.");
>>
>> Why not append mode?  That would also make the above
>> redirection more secure.
>
> Why append mode? How is it making it more secure?

In principle, if something went wrong in a test, it could
seek back in its output stream.  We are only appending anyway.

> This bit [BINDIR] works, did I miss anything?

No, I was confused.  No wonder, I am not at all familiar
with the build system...

Have you got an idea why your patch has not been committed?

Feri.



More information about the wine-devel mailing list