[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[SCM] libgnokii and core programs branch, master, updated. rel_0_6_29-56
From: |
Daniele Forsi |
Subject: |
[SCM] libgnokii and core programs branch, master, updated. rel_0_6_29-566-ge103b5b |
Date: |
Thu, 16 Jan 2014 17:15:55 +0000 |
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "libgnokii and core programs".
The branch, master has been updated
via e103b5b15a5676b40d7c7794e7a9279242d32ce6 (commit)
from 0a7831d7c4539065387764f4ae29f9a665ab3e7b (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit/gnokii.git/commit/?id=e103b5b15a5676b40d7c7794e7a9279242d32ce6
commit e103b5b15a5676b40d7c7794e7a9279242d32ce6
Author: Daniele Forsi <address@hidden>
Date: Thu Jan 16 18:09:38 2014 +0100
Fix error when restarting a connection
When restarting a connection with busterminate() + businit(), the
message_buffer pointer is NULL but max_message_len wasn't reset to
0 because it is a static local variable and the test len > max_message_len
can fail which means a new buffer isn't allocated and a NULL is returned.
diff --git a/common/links/fbus-phonet.c b/common/links/fbus-phonet.c
index 221f794..3300cea 100644
--- a/common/links/fbus-phonet.c
+++ b/common/links/fbus-phonet.c
@@ -51,7 +51,7 @@ static int verify_max_message_len(int len, char
**message_buffer)
{
static int max_message_len = 0;
- if (len > max_message_len) {
+ if (len > max_message_len || !*message_buffer) {
dprintf("overrun, reallocating: %d %d\n", len, max_message_len);
*message_buffer = realloc(*message_buffer, len + 1);
max_message_len = len + 1;
-----------------------------------------------------------------------
Summary of changes:
common/links/fbus-phonet.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
hooks/post-receive
--
libgnokii and core programs
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [SCM] libgnokii and core programs branch, master, updated. rel_0_6_29-566-ge103b5b,
Daniele Forsi <=