From: Eli Zaretskii <eliz@gnu.org>
To: Juanma Barranquero <lekktu@gmail.com>
Cc: emacs-devel@gnu.org
Subject: Re: Fixing some warnings in emacs-26
Date: Sat, 08 Jun 2019 09:41:33 +0300 [thread overview]
Message-ID: <838sucpoiq.fsf@gnu.org> (raw)
In-Reply-To: <CAAeL0SQ39+YZohvmY+QmWNEVGciheJ+xq6+YpmE6Y4PDMEzJVg@mail.gmail.com> (message from Juanma Barranquero on Sat, 8 Jun 2019 07:11:01 +0200)
> From: Juanma Barranquero <lekktu@gmail.com>
> Date: Sat, 8 Jun 2019 07:11:01 +0200
>
> I'd like to propose these two patches for the emacs-26 release branch.
Thanks.
> The first one fixes a real (if perhaps unlikely) buffer overflow in addpm.c.
Thanks for catching that, see a comment below.
> The second one just adds a couple of defvars and marks some unused
> args with _underscore to silence a few lexical warnings.
LGTM, thanks. However, please install those on master, as I'd like to
minimize changes on the release branch: we will start the pretest of
Emacs 26.3 soon.
In general, cleanups that have no real bearing on the code should be
installed on master.
> --- a/nt/addpm.c
> +++ b/nt/addpm.c
> @@ -219,7 +219,7 @@ main (int argc, char *argv[])
> {
> int result;
>
> - char msg[ MAX_PATH ];
> + char msg[ MAX_PATH + 20 ]; /* Needs extra space for fixed text. */
> sprintf (msg, "Install Emacs at %s?\n", emacs_path);
Instead of the arbitrary value of 20, I'd prefer using sizeof for the
actual text (which should probably be assigned to a variable, to avoid
mentioning the same text twice).
next prev parent reply other threads:[~2019-06-08 6:41 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-08 5:11 Fixing some warnings in emacs-26 Juanma Barranquero
2019-06-08 6:41 ` Eli Zaretskii [this message]
2019-06-08 7:07 ` Juanma Barranquero
2019-06-08 8:43 ` Eli Zaretskii
2019-06-08 22:55 ` Juanma Barranquero
2019-06-09 6:12 ` Eli Zaretskii
2019-06-08 8:22 ` Andreas Schwab
2019-06-08 8:51 ` Eli Zaretskii
2019-06-09 11:02 ` Juanma Barranquero
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=838sucpoiq.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=lekktu@gmail.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.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
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.