gnokii-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[SCM] libgnokii and core programs branch, master, updated. rel_0_6_29-45


From: Daniele Forsi
Subject: [SCM] libgnokii and core programs branch, master, updated. rel_0_6_29-454-g6facbf3
Date: Mon, 15 Apr 2013 12:12:15 +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  6facbf3639db0f28695dfa53e096213c83baa950 (commit)
      from  6b3d04b15c2c128312a7f22f6ff6a222031c6b98 (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=6facbf3639db0f28695dfa53e096213c83baa950


commit 6facbf3639db0f28695dfa53e096213c83baa950
Author: Daniele Forsi <address@hidden>
Date:   Mon Apr 15 14:03:37 2013 +0200

    Fix possible NULL dereferences
    
    Fixes errors found with scan-build:
    Access to field 'memory_type' results in a dereference of a null
    pointer (loaded from field 'phonebook_entry')

diff --git a/common/phones/nk6510.c b/common/phones/nk6510.c
index 2b23d0b..7d83e55 100644
--- a/common/phones/nk6510.c
+++ b/common/phones/nk6510.c
@@ -2739,6 +2739,7 @@ static gn_error NK6510_IncomingPhonebook(int messagetype, 
unsigned char *message
                        data->phonebook_entry->caller_group = 
GN_PHONEBOOK_GROUP_None;
                        data->phonebook_entry->name[0] = '\0';
                        data->phonebook_entry->number[0] = '\0';
+                       data->phonebook_entry->memory_type = 
get_gn_memory_type_phonebook(message[11]);
                        data->phonebook_entry->subentries_count = 0;
                        data->phonebook_entry->date.year = 0;
                        data->phonebook_entry->date.month = 0;
@@ -2765,7 +2766,6 @@ static gn_error NK6510_IncomingPhonebook(int messagetype, 
unsigned char *message
                        }
                }
                dprintf("Received phonebook info\n");
-               data->phonebook_entry->memory_type = 
get_gn_memory_type_phonebook(message[11]);
                blocks     = message[21];
                return phonebook_decode(message + 22, length - 21, data, 
blocks, message[11], 12);
 
diff --git a/common/phones/nk7110.c b/common/phones/nk7110.c
index b49d6c6..a21ec71 100644
--- a/common/phones/nk7110.c
+++ b/common/phones/nk7110.c
@@ -689,6 +689,7 @@ static gn_error NK7110_IncomingPhonebook(int messagetype, 
unsigned char *message
                        data->phonebook_entry->caller_group = 5; /* no group */
                        data->phonebook_entry->name[0] = '\0';
                        data->phonebook_entry->number[0] = '\0';
+                       data->phonebook_entry->memory_type = 
get_gn_memory_type(message[11]);
                        data->phonebook_entry->subentries_count = 0;
                        data->phonebook_entry->date.year = 0;
                        data->phonebook_entry->date.month = 0;
@@ -723,7 +724,6 @@ static gn_error NK7110_IncomingPhonebook(int messagetype, 
unsigned char *message
                        return GN_ERR_UNSOLICITED;
                }
                dprintf("Received phonebook info\n");
-               data->phonebook_entry->memory_type = 
get_gn_memory_type(message[11]);
                blocks     = message[17];
                blockstart = message + 18;
                return phonebook_decode(blockstart, length - 17, data, blocks, 
message[11], 8);

-----------------------------------------------------------------------

Summary of changes:
 common/phones/nk6510.c |    2 +-
 common/phones/nk7110.c |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
libgnokii and core programs



reply via email to

[Prev in Thread] Current Thread [Next in Thread]