[PATCH 1/5] start.exe: unquote the title

Damjan Jovanovic damjan.jov at gmail.com
Sun Aug 4 02:09:27 CDT 2019


On Sun, Aug 4, 2019 at 6:12 AM Zebediah Figura <z.figura12 at gmail.com> wrote:

> Hello Damjan,
>

Hi


>
> On 8/3/19 10:24 PM, Damjan Jovanovic wrote:
> >  int wmain (int argc, WCHAR *argv[])
> >  {
> >       SHELLEXECUTEINFOW sei;
> > @@ -223,7 +242,13 @@ int wmain (int argc, WCHAR *argv[])
> >       for (i=1; i<argc; i++) {
> >                  /* parse first quoted argument as console title */
> >                  if (!title && argv[i][0] == '"') {
> > -                     title = argv[i];
> > +                     /* it will remove at least 1 quote */
> > +                     int maxChars = lstrlenW(argv[1]);
> > +                     title = HeapAlloc(GetProcessHeap(), 0,
> maxChars*sizeof(WCHAR));
> > +                     if (title)
> > +                             parse_title(argv[i], title, maxChars);
> > +                     else
> > +                             fatal_string(STRING_NOMEMFORTITLE);
> >                       continue;
> >               }
> >               if (argv[i][0] != '/')
>
> Is this really salient enough to warrant error handling? I wouldn't
> particularly imagine we're likely to run out of memory here.
>
>
Is it now Wine policy to ignore memory allocation errors?
Since when?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20190804/4472d748/attachment.html>


More information about the wine-devel mailing list