diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-04-23 10:41:45 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-04-23 11:45:23 +0200 |
commit | 6122f6266c61db851d7595aeb824502172b509b2 (patch) | |
tree | 2aa0f7fa5c9fb0e9acd5f5602ef0cc5f86824dc7 /include/vcl/BitmapSharpenFilter.hxx | |
parent | 6a068a90bb8b7625aca73e2c7c0a9e14a95b82be (diff) |
fix memory management in BitmapConvolutionMatrixFilter
was deleting a stack allocated buffer.
Also
(*) drop the BitmapConvolutionMatrixFilter default constructor, the
current code does not permit mpMatrix to be nullptr
(*) declare the mpMatrix field as a reference to a fixed length array,
to be more precise
(*) pass the array in the constructor so that call sites will be
properly type- and length-checked.
Change-Id: I650d56cdfac0dae4ea77df7c0c03e19d658c00c8
Reviewed-on: https://gerrit.libreoffice.org/53312
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'include/vcl/BitmapSharpenFilter.hxx')
-rw-r--r-- | include/vcl/BitmapSharpenFilter.hxx | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/include/vcl/BitmapSharpenFilter.hxx b/include/vcl/BitmapSharpenFilter.hxx index 7e965976d5e8..66cb56f3a1d5 100644 --- a/include/vcl/BitmapSharpenFilter.hxx +++ b/include/vcl/BitmapSharpenFilter.hxx @@ -16,11 +16,7 @@ class VCL_DLLPUBLIC BitmapSharpenFilter : public BitmapConvolutionMatrixFilter { public: - BitmapSharpenFilter() - { - const long pSharpenMatrix[] = { -1, -1, -1, -1, 16, -1, -1, -1, -1 }; - mpMatrix = &pSharpenMatrix[0]; - } + BitmapSharpenFilter(); }; #endif |