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-514-g83d5217
Date: Mon, 29 Apr 2013 10:37:22 +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  83d5217a612c4b152731bb91a02067e6cc32bf77 (commit)
      from  572c28c429c3a59c13d86e0622c011854c04c2d5 (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=83d5217a612c4b152731bb91a02067e6cc32bf77


commit 83d5217a612c4b152731bb91a02067e6cc32bf77
Author: Daniele Forsi <address@hidden>
Date:   Mon Apr 29 12:34:01 2013 +0200

    Re-add a check for an error returned by fread()
    
    This time also check ferror()because a return value of 0 is not
    necessarily an error.
    This also re-adds a previously translated string.

diff --git a/gnokii/gnokii-utils.c b/gnokii/gnokii-utils.c
index eb5c18e..3516ea3 100644
--- a/gnokii/gnokii-utils.c
+++ b/gnokii/gnokii-utils.c
@@ -126,6 +126,10 @@ gn_error readtext(gn_sms_user_data *udata)
 
        /* Get message text from stdin. */
        chars_read = fread(message_buffer, 1, sizeof(message_buffer), stdin);
+       if (chars_read == 0 && ferror(stdin)) {
+               fprintf(stderr, _("Couldn't read from stdin!\n"));
+               return GN_ERR_FAILED;
+       }
        if (udata->type != GN_SMS_DATA_iMelody && chars_read > 0 && 
message_buffer[chars_read - 1] == '\n')
                message_buffer[--chars_read] = 0;
        if (chars_read > (sizeof(udata->u.text) - 1)) {

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

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


hooks/post-receive
-- 
libgnokii and core programs



reply via email to

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