This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
Tom Tsou gerrit-no-reply at lists.osmocom.orgTom Tsou has submitted this change and it was merged.
Change subject: sigProcLib: Check return status on downsampling
......................................................................
sigProcLib: Check return status on downsampling
Improper length values will cause the polyphase resampler
rotation to fail. Check return and return NULL on error.
Change-Id: I3ad22f9fd7a20754f589c04258dcca3770474a9b
Fixes: Coverity CID 165235
---
M Transceiver52M/sigProcLib.cpp
1 file changed, 6 insertions(+), 2 deletions(-)
Approvals:
Tom Tsou: Looks good to me, approved
Harald Welte: Looks good to me, but someone else must approve
Jenkins Builder: Verified
diff --git a/Transceiver52M/sigProcLib.cpp b/Transceiver52M/sigProcLib.cpp
index 9673d99..4bb41a9 100644
--- a/Transceiver52M/sigProcLib.cpp
+++ b/Transceiver52M/sigProcLib.cpp
@@ -1962,8 +1962,12 @@
out = new signalVector(DOWNSAMPLE_OUT_LEN);
memcpy(in->begin(), burst.begin(), DOWNSAMPLE_IN_LEN * 2 * sizeof(float));
- dnsampler->rotate((float *) in->begin(), DOWNSAMPLE_IN_LEN,
- (float *) out->begin(), DOWNSAMPLE_OUT_LEN);
+ if (dnsampler->rotate((float *) in->begin(), DOWNSAMPLE_IN_LEN,
+ (float *) out->begin(), DOWNSAMPLE_OUT_LEN) < 0) {
+ delete out;
+ out = NULL;
+ }
+
delete in;
return out;
};
--
To view, visit https://gerrit.osmocom.org/2172
To unsubscribe, visit https://gerrit.osmocom.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I3ad22f9fd7a20754f589c04258dcca3770474a9b
Gerrit-PatchSet: 2
Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Owner: Tom Tsou <tom at tsou.cc>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Tom Tsou <tom at tsou.cc>