summaryrefslogtreecommitdiff
path: root/FL/Fl_SVG_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_SVG_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_SVG_Image.H')
-rw-r--r--FL/Fl_SVG_Image.H7
1 files changed, 4 insertions, 3 deletions
diff --git a/FL/Fl_SVG_Image.H b/FL/Fl_SVG_Image.H
index 530c51a82..2171c2a75 100644
--- a/FL/Fl_SVG_Image.H
+++ b/FL/Fl_SVG_Image.H
@@ -147,14 +147,15 @@ private:
float svg_scaling_(int W, int H);
void rasterize_(int W, int H);
virtual void cache_size_(int &width, int &height);
- void init_(const char *filename, const unsigned char *filedata, const Fl_SVG_Image *copy_source,
- size_t length);
+ void init_(const char *name, const unsigned char *filedata, size_t length);
Fl_SVG_Image(const Fl_SVG_Image *source);
public:
/** Set this to \c false to allow image re-scaling that alters the image aspect ratio.
Upon object creation, proportional is set to \c true, and the aspect ratio is kept constant.*/
bool proportional;
- Fl_SVG_Image(const char *filename, const char *svg_data = NULL, size_t length = 0);
+ Fl_SVG_Image(const char *filename);
+ Fl_SVG_Image(const char *sharedname, const char *svg_data);
+ Fl_SVG_Image(const char *sharedname, const unsigned char *svg_data, size_t length);
virtual ~Fl_SVG_Image();
virtual Fl_Image *copy(int W, int H) const;
Fl_Image *copy() const {