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-69


From: Daniele Forsi
Subject: [SCM] libgnokii and core programs branch, master, updated. rel_0_6_29-69-g902f3c4
Date: Thu, 25 Nov 2010 14:44:36 +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  902f3c47336cc6f03887ee980a61a5a434b6816b (commit)
      from  b9731bb697cb112e8ee91a809da8728cbea93d7f (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=902f3c47336cc6f03887ee980a61a5a434b6816b


commit 902f3c47336cc6f03887ee980a61a5a434b6816b
Author: Daniele Forsi <address@hidden>
Date:   Thu Nov 25 15:43:33 2010 +0100

    Replace sprintf() with snprintf() to avoid potential buffer overflow

diff --git a/common/phones/nk6510.c b/common/phones/nk6510.c
index 7a6656e..58b13c2 100644
--- a/common/phones/nk6510.c
+++ b/common/phones/nk6510.c
@@ -120,7 +120,7 @@ static int match_sms_folder_str(const char *str)
        int i;
        char path[128];
 
-       sprintf(path, "C:\\predefmessages\\%s\\", str);
+       snprintf(path, sizeof(path), "C:\\predefmessages\\%s\\", str);
        for (i = 0; (s40_30_mt_mappings[i].path != NULL) && strcmp(path, 
s40_30_mt_mappings[i].path); i++) {
 #if 0
                dprintf("comparing %s and %s\n", path, 
s40_30_mt_mappings[i].path);
@@ -1252,7 +1252,7 @@ static gn_error NK6510_GetSMSFolders_S40_30(gn_data 
*data, struct gn_statemachin
 #endif
                        data->sms_folder_list->folder_id[j] = 
s40_30_mt_mappings[k].type;
                        data->sms_folder_list->folder[j].folder_id = 
s40_30_mt_mappings[k].type;
-                       sprintf(data->sms_folder_list->folder[j].name, "%s", 
gn_memory_type_print(s40_30_mt_mappings[k].type));
+                       snprintf(data->sms_folder_list->folder[j].name, 
sizeof(data->sms_folder_list->folder[j].name), "%s", 
gn_memory_type_print(s40_30_mt_mappings[k].type));
                        j++;
                }
        }

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

Summary of changes:
 common/phones/nk6510.c |    4 ++--
 1 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]