Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
varnish-cache
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
varnishcache
varnish-cache
Commits
1c137872
Commit
1c137872
authored
Feb 02, 2016
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't leak a filename in error exits, it upsets Coverity.
parent
1f1d4872
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
4 deletions
+9
-4
vcc_compile.c
lib/libvcc/vcc_compile.c
+1
-0
vcc_vmod.c
lib/libvcc/vcc_vmod.c
+8
-4
No files found.
lib/libvcc/vcc_compile.c
View file @
1c137872
...
...
@@ -534,6 +534,7 @@ vcc_file_source(const struct vcp * const vcp, struct vsb *sb, const char *fn)
if
(
VFIL_searchpath
(
vcp
->
vcl_path
,
NULL
,
&
f
,
fn
,
&
fnp
)
||
f
==
NULL
)
{
VSB_printf
(
sb
,
"Cannot read file '%s' (%s)
\n
"
,
fnp
!=
NULL
?
fnp
:
fn
,
strerror
(
errno
));
REPLACE
(
fnp
,
NULL
);
return
(
NULL
);
}
sp
=
vcc_new_source
(
f
,
NULL
,
fnp
);
...
...
lib/libvcc/vcc_vmod.c
View file @
1c137872
...
...
@@ -61,7 +61,7 @@ void
vcc_ParseImport
(
struct
vcc
*
tl
)
{
void
*
hdl
;
char
fn
[
1024
],
*
fnp
;
char
fn
[
1024
],
*
fnp
,
*
fnpx
;
char
buf
[
256
];
struct
token
*
mod
,
*
t1
;
struct
inifin
*
ifp
;
...
...
@@ -130,14 +130,19 @@ vcc_ParseImport(struct vcc *tl)
SkipToken
(
tl
,
';'
);
if
(
VFIL_searchpath
(
tl
->
param
->
vmod_path
,
vcc_path_dlopen
,
&
hdl
,
fn
,
&
fnp
))
{
vcc_path_dlopen
,
&
hdl
,
fn
,
&
fnp
x
))
{
VSB_printf
(
tl
->
sb
,
"Could not load VMOD %.*s
\n
"
,
PF
(
mod
));
VSB_printf
(
tl
->
sb
,
"
\t
File name: %s
\n
"
,
fnp
!=
NULL
?
fnp
:
fn
);
VSB_printf
(
tl
->
sb
,
"
\t
File name: %s
\n
"
,
fnpx
!=
NULL
?
fnpx
:
fn
);
VSB_printf
(
tl
->
sb
,
"
\t
dlerror: %s
\n
"
,
dlerror
());
vcc_ErrWhere
(
tl
,
mod
);
REPLACE
(
fnpx
,
NULL
);
return
;
}
fnp
=
TlDup
(
tl
,
fnpx
);
REPLACE
(
fnpx
,
NULL
);
bprintf
(
buf
,
"Vmod_%.*s_Data"
,
PF
(
mod
));
vmd
=
dlsym
(
hdl
,
buf
);
if
(
vmd
==
NULL
)
{
...
...
@@ -195,7 +200,6 @@ vcc_ParseImport(struct vcc *tl)
VSB_printf
(
ifp
->
ini
,
"
\t
\"
%.*s
\"
,
\n
"
,
PF
(
mod
));
VSB_printf
(
ifp
->
ini
,
"
\t
"
);
EncString
(
ifp
->
ini
,
fnp
,
NULL
,
0
);
free
(
fnp
);
VSB_printf
(
ifp
->
ini
,
",
\n
"
);
AN
(
vmd
);
AN
(
vmd
->
file_id
);
...
...
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