Skip to content

Commit

Permalink
Merge pull request martijnvanbrummelen#562 from Knogle/master
Browse files Browse the repository at this point in the history
Fixed memory leak in line 328, writing 1 byte beyond allocated memory.
  • Loading branch information
PartialVolume authored Mar 26, 2024
2 parents a4ce92b + c7ada53 commit 8ad4fe2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/pass.c
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ int nwipe_random_pass( NWIPE_METHOD_SIGNATURE )
/* For the first block only, check the prng actually wrote something to the buffer */
if( z == c->device_size )
{
idx = c->device_stat.st_blksize;
idx = c->device_stat.st_blksize - 1;
while( idx > 0 )
{
if( b[idx] != 0 )
Expand Down

0 comments on commit 8ad4fe2

Please sign in to comment.