Commit dda6857f authored by Bastien Nocera's avatar Bastien Nocera

assembling: Add guards to fpi_assemble_lines()

With the goal of not crashing when we try to malloc MAXINT bytes of RAM.


Closes: #42
parent 0215483f
......@@ -365,6 +365,9 @@ struct fp_img *fpi_assemble_lines(struct fpi_line_asmbl_ctx *ctx,
unsigned char *output = g_malloc0(ctx->line_width * ctx->max_height);
struct fp_img *img;
g_return_val_if_fail (lines != NULL, NULL);
g_return_val_if_fail (lines_len > 0, NULL);
fp_dbg("%"G_GINT64_FORMAT, g_get_real_time());
row1 = lines;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment