summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorentin Lecouvey <corentin.lecouvey@open.eurogiciel.org>2014-10-17 14:17:41 +0200
committerCorentin Lecouvey <corentin.lecouvey@open.eurogiciel.org>2014-10-17 14:24:12 +0200
commitdbfd87c27e0f73b95b2ae16d0b76e059484d5375 (patch)
tree0dffc33272bbf9ea11528e0018ee598a97ad0fa5
parent15d9dee4aa77064669ddd4bccddaeaccd3865f21 (diff)
downloadcom-core-accepted/tizen_3.0.m14.3_ivi.tar.gz
com-core-accepted/tizen_3.0.m14.3_ivi.tar.bz2
com-core-accepted/tizen_3.0.m14.3_ivi.zip
Using notification API, it appears that allocating payload_size when creating a packet could makes notification-service crash sometimes when removing a notification. Checking some packet sizes shows that allocates BUFSIZ is enough and fix the problem. Change-Id: I4b1d134fe43b235b586ba184053134299cc56cb0 Signed-off-by: Corentin Lecouvey <corentin.lecouvey@open.eurogiciel.org>
-rw-r--r--src/packet.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/packet.c b/src/packet.c
index 6057b56..3c3fb79 100644
--- a/src/packet.c
+++ b/src/packet.c
@@ -378,7 +378,7 @@ EAPI struct packet *packet_create(const char *cmd, const char *fmt, ...)
payload_size = sizeof(*packet->data) + BUFSIZ;
packet->refcnt = 0;
- packet->data = calloc(1, payload_size);
+ packet->data = calloc(1, BUFSIZ);
if (!packet->data) {
ErrPrint("Heap: %s\n", strerror(errno));
packet->state = INVALID;