From 9bfdd1513ed96b8c824ecafbc1934c3d46dd04a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bryon=20Gloden=2C=20CISSP=C2=AE?= Date: Mon, 13 Mar 2017 16:46:01 -0400 Subject: [PATCH] CWE - CWE-571: Expression is Always True MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [/SoundflowerBed/AudioThruEngine.cpp:410]: An unsigned value can never be negative, so this test will always evaluate the same way. Signed-off-by: Bryon Gloden, CISSP® --- SoundflowerBed/AudioThruEngine.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/SoundflowerBed/AudioThruEngine.cpp b/SoundflowerBed/AudioThruEngine.cpp index adff937..16ae79d 100644 --- a/SoundflowerBed/AudioThruEngine.cpp +++ b/SoundflowerBed/AudioThruEngine.cpp @@ -1,4 +1,4 @@ -/* Copyright: © Copyright 2004 Apple Computer, Inc. All rights reserved. +/* Copyright: © Copyright 2004 Apple Computer, Inc. All rights reserved. Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple Computer, Inc. ("Apple") in consideration of your agreement to the following terms, and your @@ -7,7 +7,7 @@ please do not use, install, modify or redistribute this Apple software. In consideration of your agreement to abide by the following terms, and subject - to these terms, Apple grants you a personal, non-exclusive license, under AppleÕs + to these terms, Apple grants you a personal, non-exclusive license, under AppleÕs copyrights in this original Apple software (the "Apple Software"), to use, reproduce, modify and redistribute the Apple Software, with or without modifications, in source and/or binary forms; provided that if you redistribute @@ -407,7 +407,7 @@ OSStatus AudioThruEngine::OutputIOProc ( AudioDeviceID inDevice, chan++) { UInt32 outChan = This->GetChannelMap(chan) - chanstart[chan]; - if (outChan >= 0 && outChan < outnchnls) + if (outChan < outnchnls) { // odd-even float *in = (float *)This->mWorkBuf + (chan % innchnls);