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-455-gd508825
Date: Mon, 15 Apr 2013 12:18:44 +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  d5088259673ab4c6e5769f16148d8c49494a748a (commit)
      from  6facbf3639db0f28695dfa53e096213c83baa950 (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=d5088259673ab4c6e5769f16148d8c49494a748a


commit d5088259673ab4c6e5769f16148d8c49494a748a
Author: Daniele Forsi <address@hidden>
Date:   Mon Apr 15 14:14:45 2013 +0200

    Fix possible NULL dereference
    
    Fixes error found with scan-build:
    Access to field 'entry_type' results in a dereference of a null
    pointer (loaded from variable 'subentry')

diff --git a/common/nokia-decoding.c b/common/nokia-decoding.c
index 491497d..45bf258 100644
--- a/common/nokia-decoding.c
+++ b/common/nokia-decoding.c
@@ -302,9 +302,13 @@ gn_error phonebook_decode(unsigned char *blockstart, int 
length, gn_data *data,
                        data->phonebook_entry->subentries_count++;
                        break;
                case GN_PHONEBOOK_ENTRY_CallDuration:
-                       subentry->entry_type = blockstart[0];
                        seconds = blockstart[10] * 256 + blockstart[11];
                        dprintf("   CallDuration: related to seq %d seconds 
%d\n", blockstart[5], seconds);
+                       if (!subentry) {
+                               dprintf("ERROR!!!");
+                               break;
+                       }
+                       subentry->entry_type = blockstart[0];
                        snprintf(subentry->data.number, 
sizeof(subentry->data.number),
                                 "[%d] %d:%02d:%02d", blockstart[5], seconds / 
3600, seconds / 60, seconds % 60);
                        subblock_count++;

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

Summary of changes:
 common/nokia-decoding.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)


hooks/post-receive
-- 
libgnokii and core programs



reply via email to

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