summaryrefslogtreecommitdiff
path: root/FL/Fl_Bitmap.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_Bitmap.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_Bitmap.H')
-rw-r--r--FL/Fl_Bitmap.H8
1 files changed, 6 insertions, 2 deletions
diff --git a/FL/Fl_Bitmap.H b/FL/Fl_Bitmap.H
index 23fd79abd..308e09022 100644
--- a/FL/Fl_Bitmap.H
+++ b/FL/Fl_Bitmap.H
@@ -43,12 +43,16 @@ private:
int cache_w_, cache_h_; // size of bitmap when cached
public:
- /** The constructors create a new bitmap from the specified bitmap data */
+ /** The constructors create a new bitmap from the specified bitmap data.
+ \see Fl_Bitmap(const uchar *bits, int bits_length, int W, int H) */
Fl_Bitmap(const uchar *bits, int W, int H) :
Fl_Image(W,H,0), array(bits), alloc_array(0), id_(0), cache_w_(0),cache_h_(0) {data((const char **)&array, 1);}
- /** The constructors create a new bitmap from the specified bitmap data */
+ /** The constructors create a new bitmap from the specified bitmap data.
+ \see Fl_Bitmap(const char *bits, int bits_length, int W, int H) */
Fl_Bitmap(const char *bits, int W, int H) :
Fl_Image(W,H,0), array((const uchar *)bits), alloc_array(0), id_(0), cache_w_(0),cache_h_(0) {data((const char **)&array, 1);}
+ Fl_Bitmap(const uchar *bits, int bits_length, int W, int H);
+ Fl_Bitmap(const char *bits, int bits_length, int W, int H);
virtual ~Fl_Bitmap();
virtual Fl_Image *copy(int W, int H) const;
Fl_Image *copy() const { return Fl_Image::copy(); }