Changeset 2953f9a in mainline


Ignore:
Timestamp:
2008-11-01T10:01:18Z (16 years ago)
Author:
Jiri Svoboda <jirik.svoboda@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
6284978
Parents:
7d861950
Message:

Fix bdsh/cat crash. Also fix error in zero-trailing the buffer.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/bdsh/cmds/modules/cat/cat.c

    r7d861950 r2953f9a  
    104104
    105105        do {
    106                 memset(buff, 0, sizeof(buff));
    107106                bytes = read(fd, buff, blen);
    108107                if (bytes > 0) {
    109108                        count += bytes;
    110                         if (bytes < blen)
    111                                 buff[bytes] = '\0';
    112                         printf(buff);
     109                        buff[bytes] = '\0';
     110                        printf("%s", buff);
    113111                        reads++;
    114112                }
Note: See TracChangeset for help on using the changeset viewer.