[prev in list] [next in list] [prev in thread] [next in thread] 

List:       wine-devel
Subject:    Re: cmd: Use WCMD_output_asis*() for strings that are not supposed to
From:       Frédéric Delanoy <frederic.delanoy () gmail ! com>
Date:       2011-11-24 20:54:37
Message-ID: CAE4k4etwPY4wHdEZPpOvUj2K_PiVeugpeJV2mvqBN1O3GrUg4w () mail ! gmail ! com
[Download RAW message or body]

2011/11/24 Francois Gouget <fgouget@free.fr>:
> On Thu, 24 Nov 2011, Frédéric Delanoy wrote:
> [...]
>> > -            WCMD_output(newline);
>> > +            WCMD_output_asis(newline);
>> ...
>> >       static const WCHAR newLine2[] = {'\n','\n','\0'};
>> > -      if (!bare) WCMD_output (newLine2);
>> > +      if (!bare) WCMD_output_asis (newLine2);
>> ...
>> > -  WCMD_output(anykey);
>> > +  WCMD_output_asis(anykey);
>>
>> No need to change those, since we control those strings, and those are
>> generic strings with no '%' directive.
>
> Sure these won't cause a crash if left as is.
>
> But as you said we do control these strings and thus we know they don't
> need to go through wsprintf() and an extra string buffer before being
> passed on to WCMD_output_asis_*().
>
> Also changing them to WCMD_output_asis_*() means fewer WCMD_output*()
> calls to audit for potential issues (not just '%' directives but also
> buffer size issues, etc).
>
> So I think it's still very worthwhile to change them.

Right. You have a point. This patch may go in as is in that case.

Frédéric



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic