Skip to content

Commit

Permalink
Merge pull request #23 from mach-kernel/createvolume-143k
Browse files Browse the repository at this point in the history
Fix CREATEVOLUME size assertion
  • Loading branch information
mach-kernel authored Apr 23, 2018
2 parents 56d530d + 8063120 commit bb38da6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ Any and all contributions are welcome. Included is also a `cadius.pro` file you

## Changelog

#### 1.4.2
- `CREATEVOLUME` did not previously allow for the creation of 143kb images. Thanks [@inexorabletash](https://github.com/inexorabletash)!

#### 1.4.1
- `REPLACEFILE`
- Buffer overflow resolved [#17](https://github.com/mach-kernel/cadius/issues/17). Thanks [@sicklittlemonkey](https://github.com/sicklittlemonkey)!
Expand Down
4 changes: 2 additions & 2 deletions Src/Main.c
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ int main(int argc, char *argv[])
struct file_descriptive_entry *folder_entry;

/* Message Information */
logf("%s v 1.4.1 (c) Brutal Deluxe 2011-2013.\n",argv[0]);
logf("%s v 1.4.2 (c) Brutal Deluxe 2011-2013.\n",argv[0]);

/* Vérification des paramètres */
if(argc < 3)
Expand Down Expand Up @@ -974,7 +974,7 @@ struct parameter *GetParamLine(int argc, char *argv[])
if(!my_stricmp(&argv[4][strlen(argv[4])-2],"MB"))
param->new_volume_size_kb *= 1024;
}
if(param->new_volume_size_kb <= 143 || param->new_volume_size_kb > 32768)
if(param->new_volume_size_kb < 143 || param->new_volume_size_kb > 32768)
param->new_volume_size_kb = 0;
if(param->new_volume_size_kb == 0)
{
Expand Down

0 comments on commit bb38da6

Please sign in to comment.