[dev] [vis] buffer_alloc issues

From: <noname_AT_inventati.org>
Date: Wed, 25 Mar 2015 19:15:08 +0000

I'm not sure if vis is supported in suckless mailing list, but as it was
discussed here previously, i'm writing here.

There are two issues with buffer_alloc function(s).

First function is located in buffer.c:

The problem is on line 15:

If realloc fails, buf->data is set to NULL, but original buf->data is
not freed, see realloc(3). The result of realloc should be stored in
separate variable and buffer_free should be called to free buf->data and
set size and len to 0 if realloc fails.

Another issue is that there is another buffer_alloc in text.c:

Maybe these functions and data structures should be renamed to avoid
name conflict.
Received on Wed Mar 25 2015 - 20:15:08 CET

This archive was generated by hypermail 2.3.0 : Wed Mar 25 2015 - 20:24:07 CET