aboutsummaryrefslogtreecommitdiff
path: root/src/psyc/gnunet-service-psyc.c
diff options
context:
space:
mode:
authorCarlo von lynX <lynX@time.to.get.psyced.org>2016-07-28 23:36:38 +0000
committerCarlo von lynX <lynX@time.to.get.psyced.org>2016-07-28 23:36:38 +0000
commit01a8bbfb74277d3dd7f1c0e24f7ed61554658fd6 (patch)
treee86b4b7a3344cfff9e6a6fc73bb43c53d22a61bf /src/psyc/gnunet-service-psyc.c
parent39e290e789e2eccaaf5db1201b0acc9038fa8960 (diff)
downloadgnunet-01a8bbfb74277d3dd7f1c0e24f7ed61554658fd6.tar.gz
gnunet-01a8bbfb74277d3dd7f1c0e24f7ed61554658fd6.zip
fixed use after free and several printf warnings
Diffstat (limited to 'src/psyc/gnunet-service-psyc.c')
-rw-r--r--src/psyc/gnunet-service-psyc.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/psyc/gnunet-service-psyc.c b/src/psyc/gnunet-service-psyc.c
index 792164b95..9106e8731 100644
--- a/src/psyc/gnunet-service-psyc.c
+++ b/src/psyc/gnunet-service-psyc.c
@@ -856,18 +856,23 @@ store_recv_fragment_replay_result (void *cls, int64_t result,
856 case GNUNET_NO: 856 case GNUNET_NO:
857 GNUNET_MULTICAST_replay_response (rh, NULL, 857 GNUNET_MULTICAST_replay_response (rh, NULL,
858 GNUNET_MULTICAST_REC_NOT_FOUND); 858 GNUNET_MULTICAST_REC_NOT_FOUND);
859 break; 859 return;
860 860
861 case GNUNET_PSYCSTORE_MEMBERSHIP_TEST_FAILED: 861 case GNUNET_PSYCSTORE_MEMBERSHIP_TEST_FAILED:
862 GNUNET_MULTICAST_replay_response (rh, NULL, 862 GNUNET_MULTICAST_replay_response (rh, NULL,
863 GNUNET_MULTICAST_REC_ACCESS_DENIED); 863 GNUNET_MULTICAST_REC_ACCESS_DENIED);
864 break; 864 return;
865 865
866 case GNUNET_SYSERR: 866 case GNUNET_SYSERR:
867 GNUNET_MULTICAST_replay_response (rh, NULL, 867 GNUNET_MULTICAST_replay_response (rh, NULL,
868 GNUNET_MULTICAST_REC_INTERNAL_ERROR); 868 GNUNET_MULTICAST_REC_INTERNAL_ERROR);
869 return; 869 return;
870 } 870 }
871 /* GNUNET_MULTICAST_replay_response frees 'rh' when passed
872 * an error code, so it must be ensured no further processing
873 * is attempted on 'rh'. Maybe this should be refactored as
874 * it doesn't look very intuitive. --lynX
875 */
871 GNUNET_MULTICAST_replay_response_end (rh); 876 GNUNET_MULTICAST_replay_response_end (rh);
872} 877}
873 878
@@ -2269,6 +2274,9 @@ client_recv_psyc_message (void *cls, struct GNUNET_SERVER_Client *client,
2269 uint16_t size = ntohs (msg->size); 2274 uint16_t size = ntohs (msg->size);
2270 if (GNUNET_MULTICAST_FRAGMENT_MAX_PAYLOAD < size - sizeof (*msg)) 2275 if (GNUNET_MULTICAST_FRAGMENT_MAX_PAYLOAD < size - sizeof (*msg))
2271 { 2276 {
2277 /* Coverity says this printf has incompatible args
2278 * but I don't see anything wrong with it.. FIXME
2279 */
2272 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, 2280 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
2273 "%p Message payload too large: %u < %u.\n", 2281 "%p Message payload too large: %u < %u.\n",
2274 chn, 2282 chn,