Since I'm close, I will not be posting any of my code up front. I'm at a point where everything checks except these two
:( Requesting cat.jpg returns 200, image/jpeg, and correct image
:( Requesting two files in a row (cat.html then cat.jpg) succeeds
Both coming up with
\ expected an exit code of 0, not standard error of "======= Backtrace: ...
I've read that this means there is a segment fault and indeed there is, but I'm having trouble knowing where.
I am using
fgetc to get
int c from
file and stop the loop using
EOF. I've read there are problems with that involving the beginning of images, others are saying it works fine.
In the loop I check if I have expended my
buffer and if so
buffer based on the length times two.
I am fine with posting my code if needed for clarification but would rather do so as needed.
I have done my best to ensure that I do not deallocate memory that would still be used (copying
content). I do deallocate
buffer after I use
memcpy to move the data from
Here are the CS50 Check Results: https://sandbox.cs50.net/checks/516bbb50cb274eef9fd9c0aee587e957