From 3653332b324aa5813db6d730a0d1c286600cece4 Mon Sep 17 00:00:00 2001 From: GiorgiaS <72631032+GiorgiaS@users.noreply.github.com> Date: Mon, 21 Mar 2022 14:01:00 +0100 Subject: [PATCH] Update PSIServer if-statement I suggest this change because if you are in the "CARDINALITY" mode, the "if" at line 196 will result in the following error during the matching: "terminate called after throwing an instance of 'std::out_of_range' what(): vector::_M_range_check: __n (which is 0) >= this ->size() (which is 0)" --- src/PSIServer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PSIServer.cpp b/src/PSIServer.cpp index 41bc068..95cd5f1 100644 --- a/src/PSIServer.cpp +++ b/src/PSIServer.cpp @@ -193,7 +193,7 @@ ServerResponse PSIServer::perform_psi(ClientRequest &req, const ExperimentParams } // Load the correct horizontal chunk from the server batch vector chunk = get_chunk(server_batch, n_slots, hi); - if (params.apply_diff_privacy) { + if (mode == INTERSECTION && params.apply_diff_privacy) { apply_diff_privacy(chunk, fake_x_vec.at(vi), params.no_match); } // cout << "client index: " << vi << " hash: " << hash_nr << " j: " << j << " hi: " << hi << " vi: " << vi << " Chunk: " << chunk << endl;