Skip to content
Snippets Groups Projects
Commit bb3ed321 authored by Ilya Verbin's avatar Ilya Verbin Committed by Aleksandr Lyapunov
Browse files

app: fix crash with multiple -e -l options

Tarantool used to crash if launched with multiple -e or -l options without
a space between the option and the value, e.g.: `tarantool -ea -eb`.
It happened because optv[] was allocated for argc==3 items, while 4
options were written to it after parsing (-e, a, -e, b).
This patch allocates optv[] for the maximum possible number of options:
(argc - 1) * 2.

Closes #5747

NO_DOC=bugfix
parent ed01ac1a
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment