]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
fsck.minix: be more paranoid with block buffers [coverity scan]
authorKarel Zak <kzak@redhat.com>
Tue, 4 Aug 2015 09:15:53 +0000 (11:15 +0200)
committerKarel Zak <kzak@redhat.com>
Tue, 4 Aug 2015 09:15:53 +0000 (11:15 +0200)
Signed-off-by: Karel Zak <kzak@redhat.com>
disk-utils/fsck.minix.c

index f73ac4ae2c2d5fd306b59883ef3e5a9397a625fa..13ca7ca053c525bfa87205a5c45ed20cd9273f82 100644 (file)
@@ -930,7 +930,7 @@ check_zones2(unsigned int i) {
 
 static void
 check_file(struct minix_inode *dir, unsigned int offset) {
-       static char blk[MINIX_BLOCK_SIZE];
+       static char blk[MINIX_BLOCK_SIZE + 2];
        struct minix_inode *inode;
        unsigned int ino;
        char *name;
@@ -1002,7 +1002,7 @@ check_file(struct minix_inode *dir, unsigned int offset) {
 
 static void
 check_file2(struct minix2_inode *dir, unsigned int offset) {
-       static char blk[MINIX_BLOCK_SIZE];
+       static char blk[MINIX_BLOCK_SIZE + 4];
        struct minix2_inode *inode;
        ino_t ino;
        char *name;