From 27209128591da14ff016f5aa8a1e21ffeab11333 Mon Sep 17 00:00:00 2001 From: rahra Date: Tue, 21 Aug 2018 09:44:56 +0200 Subject: [PATCH] added clarification for prototype cairo_read_func_len_t --- src/cairo_jpg.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/cairo_jpg.h b/src/cairo_jpg.h index a0e27f8..b78efe3 100644 --- a/src/cairo_jpg.h +++ b/src/cairo_jpg.h @@ -19,6 +19,10 @@ * the user if cairo_image_surface_create_from_jpeg_stream() is used. Please * note that this prototype is slightly different from cairo_read_func_t which * is used by cairo_image_surface_create_from_png_stream(). + * This new prototype is defined because the original prototype + * cairo_read_func_t does not allow to detect truncated reads. This issue was + * discussed on the cairographics mailinglist, see + * https://lists.cairographics.org/archives/cairo/2016-March/027298.html * @param closure This parameter is directly passed through by * cairo_image_surface_create_from_jpeg_stream(). * @param data Pointer to data buffer which will receive the data.