summaryrefslogtreecommitdiff
path: root/FL/Fl_Image.H
diff options
context:
space:
mode:
authorMatthias Melcher <github@matthiasm.com>2022-12-17 16:01:35 +0100
committerGitHub <noreply@github.com>2022-12-17 16:01:35 +0100
commit12da87ba0c11a7b46d6cdc5716f0b30523898429 (patch)
tree3403a5954fdc7641bcb3387f5b1cf78e85bb08cc /FL/Fl_Image.H
parent08f6741d7b0115787309c9ee4800ecbe317c3c07 (diff)
Adding length checks for in-memory image data (see #542) (#592)
SVG is now decompressed in memory Bitmap invalid array length handling to return an error RGB Image data reader to return error if image data is too short FLUID: Add size argument to bitmap and JPEG data
Diffstat (limited to 'FL/Fl_Image.H')
-rw-r--r--FL/Fl_Image.H8
1 files changed, 5 insertions, 3 deletions
diff --git a/FL/Fl_Image.H b/FL/Fl_Image.H
index 038384991..d571d9e88 100644
--- a/FL/Fl_Image.H
+++ b/FL/Fl_Image.H
@@ -60,9 +60,10 @@ enum Fl_RGB_Scaling {
class FL_EXPORT Fl_Image {
friend class Fl_Graphics_Driver;
public:
- static const int ERR_NO_IMAGE = -1;
- static const int ERR_FILE_ACCESS = -2;
- static const int ERR_FORMAT = -3;
+ static const int ERR_NO_IMAGE = -1;
+ static const int ERR_FILE_ACCESS = -2;
+ static const int ERR_FORMAT = -3;
+ static const int ERR_MEMORY_ACCESS = -4;
private:
int w_, h_, d_, ld_, count_;
@@ -353,6 +354,7 @@ private:
public:
Fl_RGB_Image(const uchar *bits, int W, int H, int D=3, int LD=0);
+ Fl_RGB_Image(const uchar *bits, int bits_length, int W, int H, int D, int LD);
Fl_RGB_Image(const Fl_Pixmap *pxm, Fl_Color bg=FL_GRAY);
virtual ~Fl_RGB_Image();
virtual Fl_Image *copy(int W, int H) const;