[libdvdcss-devel] Fix calculation of cache filename length.
[email protected] (Diego Biurrun) Tue, 4 Nov 2014 16:26:03 +0100 (CET)
| Newsgroups | gmane.comp.video.videolan.libdvdcss,gmane.comp.video.videolan.libdvdcss.devel |
|---|---|
| Message-ID | <[email protected]> |
libdvdcss | branch: master | Diego Biurrun <[email protected]> | Tue Nov 4 12:52:06 2014 +0100| [2aca6d8b6702b30907b2a6761e7ab0cb94f9a927] | committer: Diego Biurrun Fix calculation of cache filename length. The calculation skipped some parts that are included in the filename. > http://git.videolan.org/gitweb.cgi/libdvdcss.git/?a=commit;h=2aca6d8b6702b30907b2a6761e7ab0cb94f9a927 --- src/libdvdcss.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/libdvdcss.c b/src/libdvdcss.c index 2fb09e2..65a6267 100644 --- a/src/libdvdcss.c +++ b/src/libdvdcss.c @@ -270,7 +270,8 @@ static char *set_cache_directory( dvdcss_t dvdcss ) /* Check that there is enough space for the cache directory path and the * block filename. The +1 are path separators and terminating null byte. */ else if( strlen( psz_cache ) + 1 + DISC_TITLE_LENGTH + 1 + - STRING_KEY_SIZE + CACHE_FILENAME_LENGTH + 1 > PATH_MAX ) + MANUFACTURING_DATE_LENGTH + 1 + STRING_KEY_SIZE + 1 + + CACHE_FILENAME_LENGTH + 1 > PATH_MAX ) { print_error( dvdcss, "cache directory name is too long" ); return NULL; _______________________________________________ libdvdcss-devel mailing list [email protected] https://mailman.videolan.org/listinfo/libdvdcss-devel