Commit 6f9b2f9d authored by A. Wilcox's avatar A. Wilcox

Etsy: Read picture data into memory correctly to ensure uploads succeed.

parent e8003c0e
......@@ -1279,7 +1279,7 @@ void EtsySite::__internal_uploadPhoto(const char * const *photos, const char *li
if(pic_data == NULL)
alloc_error("picture buffer", complete + 131072);
size_t bytes_read = fread(pic_data, 1, 131072, pic);
size_t bytes_read = fread(((char *)pic_data) + complete, 1, 131072, pic);
if(bytes_read < 131072)
{
if(ferror(pic)) { nonfatal_error("photo cannot be read from disk; skipping"); photos++; continue; }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment