Browse Source

* Fix a buffer overflow in the import format autodetection code.

tags/v0.99.beta14
Sam Hocevar sam 18 years ago
parent
commit
2c906c99e3
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      cucul/import.c

+ 1
- 1
cucul/import.c View File

@@ -90,7 +90,7 @@ cucul_canvas_t * cucul_import_canvas(cucul_buffer_t *buffer, char const *format)
return import_caca(buffer->data, buffer->size);

/* If we find ESC[ argv, we guess it's an ANSI file */
for(i = 0; i < buffer->size - 1; i++)
for(i = 0; i + 1 < buffer->size; i++)
if((buf[i] == 0x1b) && (buf[i + 1] == '['))
return import_ansi(buffer->data, buffer->size, 0);



Loading…
Cancel
Save