if (size % 16 > 0)\r
bufsize += 16;\r
\r
- unsigned int got;\r
unsigned int oldpos = cf->filepos;\r
\r
crbuf = new unsigned char[bufsize]; // not an efficient way to do this, but oh well\r
read(cf->fd, backbuffer, 16);\r
}\r
\r
- for (unsigned int i = 0; i < bufsize / 16; i++)\r
+ for (unsigned i = 0; i < bufsize / 16; i++)\r
{\r
aes_decrypt(crbuf+(i*16), decbuf, cf->ctx);\r
\r
- for (int j = 0; j < 16; j++)\r
+ for (unsigned char j = 0; j < 16; j++)\r
dcbuf[(i*16)+j] = decbuf[j] ^ (backbuffer[j] - j);\r
\r
if (((cryptpos + i*16) + 16) % 4080 == 0)\r
}\r
\r
memcpy(buf, dcbuf+difference, size);\r
- memset(backbuffer, '\0', 16);\r
- memcpy(backbuffer, dcbuf, 15);\r
+ //memset(backbuffer, '\0', 16);\r
+ //memcpy(backbuffer, dcbuf, 15);\r
\r
cf->filepos = oldpos + size;\r
\r