Browse Source

* Fixed a crash when realloc() returns a new address.

tags/v0.99.beta14
Sam Hocevar sam 18 years ago
parent
commit
a125090228
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      src/cacaserver.c

+ 1
- 1
src/cacaserver.c View File

@@ -215,7 +215,7 @@ int main(void)
| ((uint32_t)buf[10] << 8) | (uint32_t)buf[11]; | ((uint32_t)buf[10] << 8) | (uint32_t)buf[11];


size = 12 + width * height * 5 + 4; size = 12 + width * height * 5 + 4;
server->input = realloc(server->input, size);
buf = server->input = realloc(server->input, size);
read(0, buf + 12, size - 12); read(0, buf + 12, size - 12);


/* Free the previous canvas, if any */ /* Free the previous canvas, if any */


Loading…
Cancel
Save