All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Erik Faye-Lund <kusmabite@gmail.com>
Cc: git mailing list <git@vger.kernel.org>,
	Erik Faye-Lund <kusmabite@googlemail.com>,
	Arjun Sreedharan <arjun024@gmail.com>,
	Mike Pape <dotzenlabs@gmail.com>
Subject: Re: [PATCH] win32: syslog: prevent potential realloc memory leak
Date: Sun, 25 Jan 2015 20:25:29 -0800	[thread overview]
Message-ID: <xmqqzj96mame.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <CABPQNSbCF7P23K+uj00PmjJkr=19t=W5wCN0-jweBJYEWgUWRw@mail.gmail.com> (Erik Faye-Lund's message of "Sun, 25 Jan 2015 22:38:39 +0100")

Erik Faye-Lund <kusmabite@gmail.com> writes:

> Sorry for very late reply. I had a bug in my mail rules that caused
> this email to skip my inbox. That should be fixed now.
>
> On Mon, Dec 15, 2014 at 7:11 PM, Junio C Hamano <gitster@pobox.com> wrote:
> ...
>> Regardless of that funny %1 business, I notice in
>>
>>     http://msdn.microsoft.com/en-us/library/windows/desktop/aa363679%28v=vs.85%29.aspx
>>
>> that each element of lpStrings array that is passed to ReportEvent()
>> is limited to 32k or so.  Wouldn't it make it a lot simpler if we
>> removed the dynamic allocation and use a fixed sized 32k buffer here
>> (and truncate the result as necessary)?  That would make the "leak"
>> disappear automatically.
>
> That's a very good point. Yes, I think that makes more sense.

OK, so I'd expect a simpler non-reallocating code to materialize
and will drop Arjun's patch for now.

Thanks.

      reply	other threads:[~2015-01-26  4:25 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-13  9:41 [PATCH] win32: syslog: prevent potential realloc memory leak Arjun Sreedharan
2014-12-15 18:11 ` Junio C Hamano
2015-01-25 21:38   ` Erik Faye-Lund
2015-01-26  4:25     ` Junio C Hamano [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqqzj96mame.fsf@gitster.dls.corp.google.com \
    --to=gitster@pobox.com \
    --cc=arjun024@gmail.com \
    --cc=dotzenlabs@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=kusmabite@gmail.com \
    --cc=kusmabite@googlemail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.