Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
GNOME
File Roller
Commits
57268e51
Commit
57268e51
authored
Aug 27, 2018
by
Paolo Bacchilega
Browse files
Path traversal vulnerability
Do not extract files with relative paths. [bug #794337]
parent
1659a14e
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/glib-utils.c
View file @
57268e51
...
...
@@ -1079,7 +1079,7 @@ sanitize_filename (const char *file_name)
prefix_len
=
0
;
for
(
p
=
file_name
;
*
p
;
)
{
if
(
ISDOT
(
p
[
0
])
&&
ISDOT
(
p
[
1
])
&&
(
ISSLASH
(
p
[
2
])
||
!
p
[
2
]))
p
re
fix_len
=
p
+
2
-
file_name
;
re
turn
NULL
;
do
{
char
c
=
*
p
++
;
...
...
Write
Preview
Supports
Markdown
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