Tarantool development patches archive
 help / color / mirror / Atom feed
From: Kirill Yukhin <kyukhin@tarantool.org>
To: Vladislav Shpilevoy <v.shpilevoy@tarantool.org>
Cc: tarantool-patches@dev.tarantool.org
Subject: Re: [Tarantool-patches] [PATCH 1/1] app: handle concatenated argv name-value correctly
Date: Thu, 20 Feb 2020 09:24:42 +0300	[thread overview]
Message-ID: <20200220062442.chl7cnrpusxfwond@tarantool.org> (raw)
In-Reply-To: <450bafe2e276ac6e520d4772f82f033873c8039a.1582067172.git.v.shpilevoy@tarantool.org>

Hello,

On 19 фев 00:08, Vladislav Shpilevoy wrote:
> The server used to crash when any option argument was passed with
> a value concatenated to it, like this: '-lvalue', '-evalue'
> instead of '-l value' and '-e value'.
> 
> However this is a valid way of writing values, and it should not
> have crashed regardless of its validity.
> 
> The bug was in usage of 'optind' global variable from getopt()
> function family. It is not supposed to be used for getting an
> option's value. It points to a next argv to parse. Next argv !=
> value of current argv, like it was with '-lvalue' and '-evalue'.
> 
> For getting a current value there is a variable 'optarg'.
> 
> Closes #4775
> ---
> Branch: https://github.com/tarantool/tarantool/tree/gerold103/gh-4775-crash-on-l-e-opts
> Issue: https://github.com/tarantool/tarantool/issues/4775

I've checked your patch into 1.10, 2.2, 2.3 and master.

--
Regards, Kirill Yukhin

      parent reply	other threads:[~2020-02-20  6:24 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-18 23:08 Vladislav Shpilevoy
2020-02-19  8:54 ` Igor Munkin
2020-02-19 23:09   ` Vladislav Shpilevoy
2020-02-20  6:24 ` Kirill Yukhin [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=20200220062442.chl7cnrpusxfwond@tarantool.org \
    --to=kyukhin@tarantool.org \
    --cc=tarantool-patches@dev.tarantool.org \
    --cc=v.shpilevoy@tarantool.org \
    --subject='Re: [Tarantool-patches] [PATCH 1/1] app: handle concatenated argv name-value correctly' \
    /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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox