View | Details | Raw Unified | Return to bug 252321
Collapse All | Expand All

(-)b/multimedia/libdvdcss/Makefile (-3 / +4 lines)
Lines 2-10 Link Here
2
# $FreeBSD$
2
# $FreeBSD$
3
3
4
PORTNAME=	libdvdcss
4
PORTNAME=	libdvdcss
5
PORTVERSION=	1.4.2
5
DISTVERSION=	1.4.2
6
PORTREVISION=	1
6
CATEGORIES=	multimedia
7
CATEGORIES=	multimedia
7
MASTER_SITES=	http://download.videolan.org/pub/${PORTNAME}/${PORTVERSION}/
8
MASTER_SITES=	https://download.videolan.org/pub/${PORTNAME}/${DISTVERSION}/
8
9
9
MAINTAINER=	jpaetzel@FreeBSD.org
10
MAINTAINER=	jpaetzel@FreeBSD.org
10
COMMENT=	Portable abstraction library for DVD decryption
11
COMMENT=	Portable abstraction library for DVD decryption
Lines 14-20 LICENSE_FILE= ${WRKSRC}/COPYING Link Here
14
15
15
RESTRICTED=	CSS code may violate the DMCA
16
RESTRICTED=	CSS code may violate the DMCA
16
17
17
USES=		gmake libtool pathfix tar:bzip2
18
USES=		libtool pathfix tar:bzip2
18
GNU_CONFIGURE=	yes
19
GNU_CONFIGURE=	yes
19
USE_LDCONFIG=	yes
20
USE_LDCONFIG=	yes
20
INSTALL_TARGET=	install-strip
21
INSTALL_TARGET=	install-strip
(-)b/multimedia/libdvdcss/files/patch-src_libdvdcss.c (-1 / +23 lines)
Added Link Here
0
- 
1
--- src/libdvdcss.c.orig	2018-03-02 15:44:29 UTC
2
+++ src/libdvdcss.c
3
@@ -320,7 +320,19 @@ static int init_cache_dir( dvdcss_t dvdcss )
4
         return -1;
5
     }
6
 
7
-    sprintf( psz_tagfile, "%s/" CACHE_TAG_NAME, dvdcss->psz_cachefile );
8
+    i_ret = snprintf( psz_tagfile, PATH_MAX, "%s/" CACHE_TAG_NAME,
9
+                      dvdcss->psz_cachefile );
10
+    if ( i_ret < 0 || i_ret >= PATH_MAX)
11
+    {
12
+        if ( i_ret < 0)
13
+            print_error( dvdcss, "failed to compose cache directory tag path");
14
+        else
15
+            print_error( dvdcss, "cache directory tag path too long: %s/" CACHE_TAG_NAME,
16
+                         dvdcss->psz_cachefile );
17
+        dvdcss->psz_cachefile[0] = '\0';
18
+        return -1;
19
+    }
20
+
21
     i_fd = open( psz_tagfile, O_RDWR|O_CREAT, 0644 );
22
     if( i_fd >= 0 )
23
     {

Return to bug 252321