1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-24 00:45:52 +00:00

- Fix loop in a way that likely terminates before the array overflows [1]

- Allow to be built with clang

Obtained from:	pkgsrc [1]
Approved by: maintainer (implicit)
This commit is contained in:
Dima Panov 2012-06-12 07:54:48 +00:00
parent 4caad35110
commit 59642d1219
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=299100
2 changed files with 15 additions and 1 deletions

View File

@ -7,7 +7,7 @@
PORTNAME= liblastfm
PORTVERSION= 0.3.3
PORTREVISION= 3
PORTREVISION= 4
CATEGORIES= audio
MASTER_SITES= ${MASTER_SITE_LOCAL}
MASTER_SITE_SUBDIR= swills
@ -20,6 +20,7 @@ LIB_DEPENDS= samplerate.1:${PORTSDIR}/audio/libsamplerate \
fftw3:${PORTSDIR}/math/fftw3 \
fftw3f:${PORTSDIR}/math/fftw3-float
USE_CSTD= gnu89
USE_RUBY= yes
USE_GMAKE= yes
USE_QT4= corelib xml network sql gui qtestlib \

View File

@ -0,0 +1,13 @@
$NetBSD: patch-src_fingerprint_fplib_FloatingAverage.h,v 1.1 2012/04/17 17:39:47 joerg Exp $
--- src/fingerprint/fplib/FloatingAverage.h.orig 2012-04-17 15:10:50.000000000 +0000
+++ src/fingerprint/fplib/FloatingAverage.h
@@ -76,7 +76,7 @@ public:
{
T real_sum = 0;
const T* pCircularBuffer = m_values.get_buffer();
- for ( int i = 0; i < size; ++i )
+ for ( int i = 0; i < size(); ++i )
real_sum += pCircularBuffer[i];
return abs(real_sum - m_sum) / this->size();
}