char *data = g_malloc(result);
if (strchr(result_buf, '\n') != NULL) {
- int header_size = strchr(result_buf, '\n') - result_buf;
+ int header_size = strchr(result_buf, '\n') - result_buf + 1;
int data_bytes = bytes - header_size;
if (data_bytes > result)
data_bytes = result;