Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
libdvdcss
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
2
Issues
2
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
VideoLAN
libdvdcss
Commits
3e39640f
Commit
3e39640f
authored
Nov 10, 2014
by
Diego Biurrun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
libdvdcss: Add error checking in create_cache_subdir()
parent
ff00fc06
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
7 deletions
+10
-7
src/libdvdcss.c
src/libdvdcss.c
+10
-7
No files found.
src/libdvdcss.c
View file @
3e39640f
...
...
@@ -320,19 +320,19 @@ static void create_cache_subdir( dvdcss_t dvdcss )
i_ret
=
dvdcss
->
pf_seek
(
dvdcss
,
0
);
if
(
i_ret
!=
0
)
{
return
;
goto
error
;
}
i_ret
=
dvdcss
->
pf_read
(
dvdcss
,
p_sector
,
1
);
if
(
i_ret
!=
1
)
{
return
;
goto
error
;
}
if
(
p_sector
[
0
]
==
0x00
&&
p_sector
[
1
]
==
0x00
&&
p_sector
[
2
]
==
0x01
&&
p_sector
[
3
]
==
0xba
)
{
return
;
goto
error
;
}
/* The data we are looking for is at sector 16 (32768 bytes):
...
...
@@ -342,13 +342,13 @@ static void create_cache_subdir( dvdcss_t dvdcss )
i_ret
=
dvdcss
->
pf_seek
(
dvdcss
,
INTERESTING_SECTOR
);
if
(
i_ret
!=
INTERESTING_SECTOR
)
{
return
;
goto
error
;
}
i_ret
=
dvdcss
->
pf_read
(
dvdcss
,
p_sector
,
1
);
if
(
i_ret
!=
1
)
{
return
;
goto
error
;
}
/* Get the disc title */
...
...
@@ -410,8 +410,7 @@ static void create_cache_subdir( dvdcss_t dvdcss )
if
(
i_ret
<
0
&&
errno
!=
EEXIST
)
{
print_error
(
dvdcss
,
"failed creating cache subdirectory"
);
dvdcss
->
psz_cachefile
[
0
]
=
'\0'
;
return
;
goto
error
;
}
i
+=
sprintf
(
dvdcss
->
psz_cachefile
+
i
,
"/"
);
...
...
@@ -420,6 +419,10 @@ static void create_cache_subdir( dvdcss_t dvdcss )
print_debug
(
dvdcss
,
"using CSS key cache dir: %s"
,
dvdcss
->
psz_cachefile
);
return
;
error:
dvdcss
->
psz_cachefile
[
0
]
=
'\0'
;
}
static
void
init_cache
(
dvdcss_t
dvdcss
)
...
...
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