~ubuntu-branches/ubuntu/precise/ureadahead/precise

« back to all changes in this revision

Viewing changes to src/values.c

  • Committer: Bazaar Package Importer
  • Author(s): Kees Cook
  • Date: 2011-03-16 17:19:01 UTC
  • Revision ID: james.westby@ubuntu.com-20110316171901-mdli938iplc8zxxt
Tags: 0.100.0-11
* src/trace.c: leave room for string termination on reads (LP: #485194).
* man/ureadahead.8: fix typo and update bug reporting URL (LP: #697770).
* debian/rules: don't bother with /var/lib/ureadahead mode.

Show diffs side-by-side

added added

removed removed

Lines of Context:
57
57
        if (fd < 0)
58
58
                nih_return_system_error (-1);
59
59
 
60
 
        len = read (fd, buf, sizeof buf);
 
60
        len = read (fd, buf, sizeof(buf) - 1);
61
61
        if (len < 0) {
62
62
                nih_error_raise_system ();
63
63
                close (fd);
90
90
                nih_return_system_error (-1);
91
91
 
92
92
        if (oldvalue) {
93
 
                len = read (fd, buf, sizeof buf);
 
93
                len = read (fd, buf, sizeof(buf) - 1);
94
94
                if (len < 0) {
95
95
                        nih_error_raise_system ();
96
96
                        close (fd);