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


From: Daniele Forsi
Subject: [SCM] libgnokii and core programs branch, master, updated. rel_0_6_29-513-g572c28c
Date: Mon, 29 Apr 2013 10:33:50 +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  572c28c429c3a59c13d86e0622c011854c04c2d5 (commit)
      from  a1aa6122e2eae778005d05c7e35df782ed868081 (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=572c28c429c3a59c13d86e0622c011854c04c2d5


commit 572c28c429c3a59c13d86e0622c011854c04c2d5
Author: Daniele Forsi <address@hidden>
Date:   Mon Apr 29 12:28:55 2013 +0200

    NUL-terminate the buffer
    
    fread() doesn't terminate it.
    Fixes:
    ==26109== Conditional jump or move depends on uninitialised value(s)
    ==26109==    at 0x44072F4: vfprintf (vfprintf.c:1623)
    ==26109==    by 0x4428DCF: vsnprintf (vsnprintf.c:120)
    ==26109==    by 0x440CED1: snprintf (snprintf.c:35)
    ==26109==    by 0x805DED6: readtext (gnokii-utils.c:141)
    ==26109==  Uninitialised value was created by a stack allocation
    ==26109==    at 0x805DDA0: readtext (gnokii-utils.c:116)
    ==26109==

diff --git a/gnokii/gnokii-utils.c b/gnokii/gnokii-utils.c
index a62318f..eb5c18e 100644
--- a/gnokii/gnokii-utils.c
+++ b/gnokii/gnokii-utils.c
@@ -131,6 +131,8 @@ gn_error readtext(gn_sms_user_data *udata)
        if (chars_read > (sizeof(udata->u.text) - 1)) {
                fprintf(stderr, _("Input too long! (%d, maximum is %d)\n"), 
chars_read, (int)(sizeof(udata->u.text) - 1));
                return GN_ERR_ENTRYTOOLONG;
+       } else {
+               message_buffer[chars_read] = '\0';
        }
 
        udata->length = snprintf(udata->u.text, sizeof(udata->u.text), "%s", 
message_buffer);

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

Summary of changes:
 gnokii/gnokii-utils.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)


hooks/post-receive
-- 
libgnokii and core programs



reply via email to

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