Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 2 Jun 2019 06:35:44 +0000 (UTC)
From:      Gleb Popov <arrowd@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r503283 - in head/multimedia/zoneminder: . files
Message-ID:  <201906020635.x526ZicW030931@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: arrowd
Date: Sun Jun  2 06:35:43 2019
New Revision: 503283
URL: https://svnweb.freebsd.org/changeset/ports/503283

Log:
  multimedia/zoneminder: Fix MP4 file generation by patching UB bug in src/zm_video.cpp file.
  
  The patch has also been merged upstream: https://github.com/ZoneMinder/zoneminder/pull/2628
  
  Reviewed by:	abi@abinet.ru (maintainer)
  Approved by:	tcberner (mentor, implicit)

Added:
  head/multimedia/zoneminder/files/patch-src_zm__video.cpp   (contents, props changed)
Modified:
  head/multimedia/zoneminder/Makefile

Modified: head/multimedia/zoneminder/Makefile
==============================================================================
--- head/multimedia/zoneminder/Makefile	Sun Jun  2 05:38:03 2019	(r503282)
+++ head/multimedia/zoneminder/Makefile	Sun Jun  2 06:35:43 2019	(r503283)
@@ -2,7 +2,7 @@
 
 PORTNAME=	zoneminder
 PORTVERSION=	1.32.3
-PORTREVISION=	1
+PORTREVISION=	2
 CATEGORIES=	multimedia
 
 MAINTAINER=	bsd@abinet.ru

Added: head/multimedia/zoneminder/files/patch-src_zm__video.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/multimedia/zoneminder/files/patch-src_zm__video.cpp	Sun Jun  2 06:35:43 2019	(r503283)
@@ -0,0 +1,17 @@
+--- src/zm_video.cpp.orig	2018-12-08 14:22:36 UTC
++++ src/zm_video.cpp
+@@ -455,11 +455,12 @@ int X264MP4Writer::x264encodeloop(bool bFlush) {
+ 
+       /* Write the sample */
+       if ( !buffer.empty() ) {
++        unsigned int bufSize = buffer.size();
+         if ( !MP4WriteSample(
+               mp4h,
+               mp4vtid,
+-              buffer.extract(buffer.size()),
+-              buffer.size(),
++              buffer.extract(bufSize),
++              bufSize,
+               duration,
+               offset,
+               prevKeyframe) ) {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201906020635.x526ZicW030931>