--- squashfs-tools/unsquashfs.c +++ squashfs-tools/unsquashfs.c @@ -1048,7 +1048,7 @@ for(i = 0; i < inode->blocks; i++) { int c_byte = SQUASHFS_COMPRESSED_SIZE_BLOCK(block_list[i]); - struct file_entry *block = malloc(sizeof(struct file_entry *)); + struct file_entry *block = malloc(sizeof(struct file_entry)); if(block == NULL) EXIT_UNSQUASH("write_file: unable to malloc file\n"); @@ -1068,7 +1068,7 @@ if(inode->frag_bytes) { int size; long long start; - struct file_entry *block = malloc(sizeof(struct file_entry *)); + struct file_entry *block = malloc(sizeof(struct file_entry)); if(block == NULL) EXIT_UNSQUASH("write_file: unable to malloc file\n"); @@ -1931,7 +1931,7 @@ struct pathnames *init_subdir() { - struct pathnames *new = malloc(sizeof(struct pathnames *)); + struct pathnames *new = malloc(sizeof(struct pathnames)); new->count = 0; return new; } --- squashfs-tools/mksquashfs.c +++ squashfs-tools/mksquashfs.c @@ -3391,7 +3391,7 @@ struct pathnames *init_subdir() { - struct pathnames *new = malloc(sizeof(struct pathnames *)); + struct pathnames *new = malloc(sizeof(struct pathnames)); new->count = 0; return new; }