git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Brad Roberts <braddr@puremagic.com>
To: git@vger.kernel.org
Subject: [patch] Fix off by one error in show-diff.c:sq_expand
Date: Sun, 17 Apr 2005 08:53:52 -0700 (PDT)	[thread overview]
Message-ID: <Pine.LNX.4.44.0504170852420.2625-100000@bellevue.puremagic.com> (raw)

tree b2eb41fec5cb7a3b83b53f1eb59e59785e57cf5d
parent 1c45567134945bccefc1b5fbacc2862cd8f346c4
author Brad Roberts <braddr@puremagic.com> 1113752911 -0700
committer Brad Roberts,,, <braddr@gameboy2> 1113752911 -0700

Fix off by one error in sq_expand, forgot space for the null.

Signed-off-by: Brad Roberts <braddr@puremagic.com>

 show-diff.c |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

Index: show-diff.c
===================================================================
--- f9e06a309f63ac6858d019b51f2172283378d2ef/show-diff.c  (mode:100644 sha1:d85d79b97a59342390bd34da09049dd58d56900f)
+++ b2eb41fec5cb7a3b83b53f1eb59e59785e57cf5d/show-diff.c  (mode:100644 sha1:462f88a67cb3a100bbf307e567eebbcf911292ce)
@@ -36,7 +36,7 @@
 	if (buf_size < cnt) {
 		free(buf);
 		buf_size = cnt;
-		buf = malloc(cnt);
+		buf = malloc(cnt+1);
 	}

 	cp = buf;


                 reply	other threads:[~2005-04-17 15:50 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=Pine.LNX.4.44.0504170852420.2625-100000@bellevue.puremagic.com \
    --to=braddr@puremagic.com \
    --cc=git@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).