[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r33018 - gnunet/src/mesh
From: |
gnunet |
Subject: |
[GNUnet-SVN] r33018 - gnunet/src/mesh |
Date: |
Thu, 10 Apr 2014 11:19:07 +0200 |
Author: bartpolot
Date: 2014-04-10 11:19:06 +0200 (Thu, 10 Apr 2014)
New Revision: 33018
Modified:
gnunet/src/mesh/gnunet-service-mesh_connection.c
Log:
- fix use after free
Modified: gnunet/src/mesh/gnunet-service-mesh_connection.c
===================================================================
--- gnunet/src/mesh/gnunet-service-mesh_connection.c 2014-04-10 09:15:39 UTC
(rev 33017)
+++ gnunet/src/mesh/gnunet-service-mesh_connection.c 2014-04-10 09:19:06 UTC
(rev 33018)
@@ -579,15 +579,18 @@
struct MeshConnectionQueue *q = cls;
double usecsperbyte;
int forced;
+ uint32_t pid;
LOG (GNUNET_ERROR_TYPE_DEBUG, "connection message_sent\n");
fc = fwd ? &c->fwd_fc : &c->bck_fc;
+ pid = 0;
LOG (GNUNET_ERROR_TYPE_DEBUG, " %ssent %s %s\n",
sent ? "" : "not ", GM_f2s (fwd), GM_m2s (type));
LOG (GNUNET_ERROR_TYPE_DEBUG, " C_P- %p %u\n", c, c->pending_messages);
if (NULL != q)
{
+ pid = q->pid;
forced = q->forced;
if (NULL != q->cont)
{
@@ -625,7 +628,10 @@
case GNUNET_MESSAGE_TYPE_MESH_ENCRYPTED:
if (GNUNET_YES == sent)
- fc->last_pid_sent = q->pid;
+ {
+ GNUNET_assert (NULL != q);
+ fc->last_pid_sent = pid;
+ }
LOG (GNUNET_ERROR_TYPE_DEBUG, "! Q_N- %p %u\n", fc, fc->queue_n);
if (GNUNET_NO == forced)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r33018 - gnunet/src/mesh,
gnunet <=