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


From: Daniele Forsi
Subject: [SCM] libgnokii and core programs branch, master, updated. rel_0_6_29-477-gba57792
Date: Thu, 18 Apr 2013 17:41:02 +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  ba57792a2a046fcf18d5fa296c67d9949afba7c5 (commit)
      from  6b41ec2579e2fdf3d4866db8d6c48fd7e990decf (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=ba57792a2a046fcf18d5fa296c67d9949afba7c5


commit ba57792a2a046fcf18d5fa296c67d9949afba7c5
Author: Daniele Forsi <address@hidden>
Date:   Thu Apr 18 19:39:18 2013 +0200

    Fix off by one bug
    
    Leave room in the buffer to add the string terminator.

diff --git a/testsuite/dump-vcard.c b/testsuite/dump-vcard.c
index 89ae62b..df2406d 100644
--- a/testsuite/dump-vcard.c
+++ b/testsuite/dump-vcard.c
@@ -57,14 +57,14 @@ int main (int argc, char **argv)
                        fclose (f);
                        return 1;
                }
-               count = fread (buf, 1, 1024 * 1024, f);
+               count = fread (buf, 1, 1024 * 1024 - 1, f);
                if (count == 0) {
                        perror ("Failed to read");
                        free (buf);
                        fclose (f);
                        return 1;
                }
-               buf[count - 1] = '\0';
+               buf[count] = '\0';
 
                fclose (f);
 

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

Summary of changes:
 testsuite/dump-vcard.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]