1
vote
Accepted
PSET4 Recover, output files are blank
This code has an infinite loop. Look at the last while condition statement:
while (fread(buffer, 512, 1, forensic) <= 1);
What happens when the end of the input file is reached? fread will ...
1
vote
Accepted
Pset4: Recovery- Empty JPEG files
You seem to be missing a concept. Each jpg will be made up of multiple blocks of 512B. Your goal is to read from the rawfile until you find a signature block. Once you do, if you already have found ...
1
vote
Accepted
CS50 Week 4 Recover. Generating 50 Blank images
The biggest problem here is that the code is trying to test for a signature before actually reading in the data from the input file. It's doing a "Ready, Fire, Aim." Order of actions is ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
blank-jpeg × 4recover × 3
pset4 × 2
week4 × 2
pset3 × 1
c × 1
segmentation-fault × 1
help × 1