Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
varnishevent3
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
uplex-varnish
varnishevent3
Commits
896c923f
Commit
896c923f
authored
May 18, 2011
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
More comprehensive implementation of ARGV_NOESC
parent
4607e604
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
3 deletions
+11
-3
argv.c
lib/libvarnish/argv.c
+11
-3
No files found.
lib/libvarnish/argv.c
View file @
896c923f
...
...
@@ -154,7 +154,7 @@ ParseArgv(const char *s, int *argc, int flag)
}
if
((
flag
&
ARGV_COMMENT
)
&&
*
s
==
'#'
)
break
;
if
(
*
s
==
'"'
)
{
if
(
*
s
==
'"'
&&
!
(
flag
&
ARGV_NOESC
)
)
{
p
=
++
s
;
quote
=
1
;
}
else
{
...
...
@@ -179,7 +179,7 @@ ParseArgv(const char *s, int *argc, int flag)
s
++
;
continue
;
}
if
(
*
s
==
'"'
)
if
(
*
s
==
'"'
&&
!
(
flag
&
ARGV_NOESC
)
)
break
;
if
(
*
s
==
'\0'
)
{
argv
[
0
]
=
err_missing_quote
;
...
...
@@ -191,7 +191,15 @@ ParseArgv(const char *s, int *argc, int flag)
argv
=
realloc
(
argv
,
sizeof
(
*
argv
)
*
(
largv
+=
largv
));
assert
(
argv
!=
NULL
);
}
argv
[
nargv
++
]
=
BackSlashDecode
(
p
,
s
);
if
(
flag
&
ARGV_NOESC
)
{
argv
[
nargv
]
=
malloc
(
1
+
(
s
-
p
));
assert
(
argv
[
nargv
]
!=
NULL
);
memcpy
(
argv
[
nargv
],
p
,
s
-
p
);
argv
[
nargv
][
s
-
p
]
=
'\0'
;
nargv
++
;
}
else
{
argv
[
nargv
++
]
=
BackSlashDecode
(
p
,
s
);
}
if
(
*
s
!=
'\0'
)
s
++
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment