Browse Source

cws2fws: check fstat return code.

Fixes CID733720
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
tags/n1.1
Michael Niedermayer 13 years ago
parent
commit
5b45b66220
1 changed files with 4 additions and 1 deletions
  1. +4
    -1
      tools/cws2fws.c

+ 4
- 1
tools/cws2fws.c View File

@@ -62,7 +62,10 @@ int main(int argc, char *argv[])
return 1;
}

fstat(fd_in, &statbuf);
if (fstat(fd_in, &statbuf) < 0) {
perror("fstat failed");
return 1;
}
comp_len = statbuf.st_size;
uncomp_len = buf_in[4] | (buf_in[5] << 8) | (buf_in[6] << 16) | (buf_in[7] << 24);



Loading…
Cancel
Save