mirror of
https://git.code.sf.net/p/zint/code
synced 2025-05-21 02:35:14 -04:00
command line: avoid arg_opts buffer overflow if -d/i used without space before arg
This commit is contained in:
parent
e5c6f99b04
commit
980e039743
3 changed files with 4 additions and 4 deletions
|
@ -515,9 +515,9 @@ int main(int argc, char **argv) {
|
|||
char *outfile_extension;
|
||||
int data_arg_num = 0;
|
||||
#ifndef _MSC_VER
|
||||
arg_opt arg_opts[(argc + 1) / 2];
|
||||
arg_opt arg_opts[argc];
|
||||
#else
|
||||
arg_opt *arg_opts = (arg_opt *) _alloca(((argc + 1) / 2) * sizeof(arg_opt));
|
||||
arg_opt *arg_opts = (arg_opt *) _alloca(argc * sizeof(arg_opt));
|
||||
#endif
|
||||
|
||||
my_symbol = ZBarcode_Create();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue