Skip to content

Commit

Permalink
Fixed bug with possible random byte overwrite.
Browse files Browse the repository at this point in the history
In certain cases ebiso will overwrite one "random" byte with '\0', which might lead to file corruption.
  • Loading branch information
gozora committed Apr 2, 2016
1 parent 7faf2e4 commit 8fcc9ca
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
5 changes: 3 additions & 2 deletions ebiso.c
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/*
* ebiso.c
*
* Version: 0.2.1
* Version: 0.2.2
*
* Release date: 13.12.2015
* Release date: 2.4.2015
*
* Copyright 2015 Vladimir (sodoma) Gozora <[email protected]>
*
Expand Down Expand Up @@ -214,6 +214,7 @@ int main(int argc, char *argv[]) {
if ((rv = iso9660_directory_record(list, fp, &ISO_data)) != E_OK) // 0xC000
unlink(ISO_data.iso_file);
else {
fseek(fp, 0, SEEK_END);
fseek(fp, BLOCK_SIZE - 1, SEEK_CUR);
fwrite(&zero, 1, 1, fp); // Write one empty block at the end
}
Expand Down
6 changes: 3 additions & 3 deletions include/ebiso.h
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/*
* ebiso.h
*
* Version: 0.2.1
* Version: 0.2.2
*
* Release date: 13.12.2015
* Release date: 2.4.2015
*
* Copyright 2015 Vladimir (sodoma) Gozora <[email protected]>
*
Expand Down Expand Up @@ -33,7 +33,7 @@
#include <getopt.h>

#define PROGNAME "ebiso"
#define EBISO_VERSION "0.2.1"
#define EBISO_VERSION "0.2.2"

#if (DEBUG == 1)
static void disp_level(struct file_list_t *list_to_display, int level);
Expand Down

0 comments on commit 8fcc9ca

Please sign in to comment.