[PATCH v2] msvcirt: Be more obvious in out-of-memory situations.

Gijs Vermeulen gijsvrm at gmail.com
Fri Sep 4 11:54:53 CDT 2020


Hi Chip,

See https://www.winehq.org/pipermail/wine-devel/2020-September/172895.html

Kind regards,
Gijs

On Fri, Sep 4, 2020, 16:44 Chip Davis <cdavis at codeweavers.com> wrote:

> September 4, 2020 4:44 AM, "Arkadiusz Hiler" <ahiler at codeweavers.com>
> wrote:
>
> > diff --git a/dlls/msvcirt/msvcirt.c b/dlls/msvcirt/msvcirt.c
> > index 7e1d9977b78..959322bdc86 100644
> > --- a/dlls/msvcirt/msvcirt.c
> > +++ b/dlls/msvcirt/msvcirt.c
> > @@ -3012,11 +3012,15 @@ ostream* __thiscall
> ostrstream_buffer_ctor(ostream *this, char *buffer, int leng
> >
> >      TRACE("(%p %p %d %d %d)\n", this, buffer, length, mode, virt_init);
> >
> > -    if (ssb) {
> > -        strstreambuf_buffer_ctor(ssb, buffer, length, buffer);
> > -        if (mode & (OPENMODE_app|OPENMODE_ate))
> > -            ssb->base.pptr = buffer + strlen(buffer);
> > +    if (!ssb) {
> > +        FIXME("out of memory\n");
>
> Shouldn't this be an ERR? It doesn't seem like this is the kind of problem
> we can fix. Ditto, the other instances of this you added.
>
>
> Chip
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20200904/120b9111/attachment-0001.htm>


More information about the wine-devel mailing list