diff options
author | Sung-jae Park <nicesj.park@samsung.com> | 2015-05-01 16:45:14 +0900 |
---|---|---|
committer | Sung-jae Park <nicesj.park@samsung.com> | 2015-05-01 16:45:14 +0900 |
commit | 1088b20756c23796c43c20e1fa97cb0b7fbb1e79 (patch) | |
tree | 538ec730a042b03cd526677bf6eab1e7c6a97b5f | |
parent | d897d062c40bdad08fd387ce3d5504de79e8f29a (diff) | |
download | com-core-1088b20756c23796c43c20e1fa97cb0b7fbb1e79.tar.gz com-core-1088b20756c23796c43c20e1fa97cb0b7fbb1e79.tar.bz2 com-core-1088b20756c23796c43c20e1fa97cb0b7fbb1e79.zip |
BUFSIZ is replaced with payload_sizesubmit/tizen_mobile/20150512.042012submit/tizen_mobile/20150511.124012submit/tizen/20150511.111918
At least now, while I make a product using this code.
There is no such problem what I read from history in Tizen 3.0.
If the crash occurred when allocating heap more large size than BUFSIZ,
It mean somewhere else is broken.
It could be caller of this function.
The problem should be invetigated again.
If you really think that the problem is caused by this.
Please let me know it. contact to me.
We need discuss it.
[model] Redwood,Kiran,B3(Wearable)
[binary_type] AP
[customer] Docomo/Orange/ATT/Open
[issue#] N/A
[problem]
[cause]
[solution]
[team] HomeTF
[request]
[horizontal_expansion]
Change-Id: I3b3c46b7c023a5805a4bb63081049e9a534e9ecc
-rw-r--r-- | src/packet.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/packet.c b/src/packet.c index edf3158..ffdca79 100644 --- a/src/packet.c +++ b/src/packet.c @@ -337,7 +337,7 @@ EAPI struct packet *packet_create_reply(const struct packet *packet, const char payload_size = sizeof(*result->data) + BUFSIZ; result->refcnt = 0; - result->data = calloc(1, BUFSIZ); + result->data = calloc(1, payload_size); if (!result->data) { ErrPrint("Heap: %s\n", strerror(errno)); result->state = INVALID; @@ -406,7 +406,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, BUFSIZ); + packet->data = calloc(1, payload_size); if (!packet->data) { ErrPrint("Heap: %s\n", strerror(errno)); packet->state = INVALID; @@ -459,7 +459,7 @@ EAPI struct packet *packet_create_noack(const char *cmd, const char *fmt, ...) payload_size = sizeof(*result->data) + BUFSIZ; result->refcnt = 0; - result->data = calloc(1, BUFSIZ); + result->data = calloc(1, payload_size); if (!result->data) { ErrPrint("Heap: %s\n", strerror(errno)); result->state = INVALID; |