Linux console tools development discussion
 help / color / mirror / Atom feed
From: Alexey Gladkov <gladkov.alexey@gmail.com>
To: Linux console tools development discussion <kbd@lists.altlinux.org>
Subject: Re: [kbd] [PATCH] libkeymap: Fix mk_mapname for the plain map
Date: Sun, 23 Feb 2020 18:36:39 +0100
Message-ID: <20200223173639.qf7fwnbxa6dihknn@comp-core-i7-2640m-0182e6> (raw)
In-Reply-To: <20191206165759.81e4f6e3b62f22433ef27c65@urjc.es>

On Fri, Dec 06, 2019 at 03:58:03PM +0000, Javier Pello García wrote:
> mk_mapname did not correctly return "plain" for the plain map
> (no modifier set) if it had already been called, as it did not
> correctly reset the static buffer that it uses for the map name.
> When mk_mapname is called for the first time from the first loop
> in lk_dump_ctable, all is fine, since buf has not been used yet
> and it is initialised to 0. However, when it is called again for
> the plain map from the second loop in lk_dump_ctable, buf already
> contains a value (left over from the last iteration in the first
> loop), and then strcat appends "plain" to that value instead of
> overwriting it, resulting in a bogus value.

Thanks for report. To fix this, it is enough to replace strcat with
strcpy. Fixed. Thanks!

-- 
Rgrds, legion



      reply	other threads:[~2020-02-23 17:36 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-06 15:58 Javier Pello García
2020-02-23 17:36 ` Alexey Gladkov [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=20200223173639.qf7fwnbxa6dihknn@comp-core-i7-2640m-0182e6 \
    --to=gladkov.alexey@gmail.com \
    --cc=kbd@lists.altlinux.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

Linux console tools development discussion

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/kbd/0 kbd/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 kbd kbd/ http://lore.altlinux.org/kbd \
		kbd@lists.altlinux.org kbd@lists.altlinux.ru kbd@lists.altlinux.com
	public-inbox-index kbd

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.kbd


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git