Questions tagged [pset3-recover]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
1answer
36 views

Pset 3 - Recover - Image does not match

I've been stuck here having no idea what went wrong for a while. Would really appreciate any help. Thank y'all! #include <stdlib.h> int isJPG(unsigned char *buffer); int main(int argc, char *...
0
votes
1answer
54 views

jpg's are not proper, mix of multiple images. Can anyone tell me whats wrong?“RECOVER”

here is my code while (fread(buffer, 512, 1, inptr) == 1) { if (buffer[0] == 0xff && buffer[1] == 0xd8 && buffer[2] == 0xff && (buffer[3] & 0xf0) == 0xe0) ...
1
vote
1answer
65 views

pset3 Recover - problem with final image

Hi I'm working on recover in pset3 and seems there is some problem when my code ends, can anyone point out the direction I should look into? Check50 returns the following error while all others are ...
0
votes
1answer
54 views

recover.c producing random image 🙁

recover.c is always producing this image: Here is my code: #include <stdio.h> #include <stdint.h> typedef enum {false, true} bool; // Bool int main(int argc, char *argv[]) { if (...
0
votes
0answers
39 views

recover.c spits out images that are partially recognizable

recover.c compiles and runs normally, but it produces 21 images that have chunks of different images mixed in. Here are the images: 000.jpg: 001.jpg: 002.jpg: 003.jpg: 004.jpg: Because I'm too ...
0
votes
1answer
184 views

Segmentation error

I am trying to run the recover pset. It compiles fine, but I am getting a segmentation fault error message. I figure that it is malloc that's causing this, but I don't quite understand how to get ...