all repos — fluxbox @ f7f454524d711624f44eedfc84c2eeab0c144c56

custom fork of the fluxbox windowmanager

check memory allocation
fluxgen fluxgen
commit

f7f454524d711624f44eedfc84c2eeab0c144c56

parent

3cf9619a920e1c6235a183033298efad60a99fc4

1 files changed, 4 insertions(+), 1 deletions(-)

jump to
M src/Shape.ccsrc/Shape.cc

@@ -19,7 +19,7 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING

// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: Shape.cc,v 1.9 2004/01/11 15:02:11 fluxgen Exp $ +// $Id: Shape.cc,v 1.10 2004/01/21 17:01:27 fluxgen Exp $ #include "Shape.hh"

@@ -62,6 +62,9 @@ const size_t data_size = win_width * win_height;

// we use calloc here so we get consistent C alloc/free with XDestroyImage // and no warnings in valgrind :) char *data = (char *)calloc(data_size, sizeof (char)); + if (data == 0) + return 0; + memset(data, 0xFF, data_size); XImage *ximage = XCreateImage(disp,