From fc66534c90cac1720fd140ddb13ffc9353369c1d Mon Sep 17 00:00:00 2001 From: William Joye Date: Thu, 16 Mar 2017 15:57:45 -0400 Subject: IIS: add check to prevent segv in case of mismatch between buffer sizes --- ds9/doc/release/r7.0.html | 4 +++- tksao/fitsy++/iis.C | 6 ++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/ds9/doc/release/r7.0.html b/ds9/doc/release/r7.0.html index df6f0f8..4b9911b 100644 --- a/ds9/doc/release/r7.0.html +++ b/ds9/doc/release/r7.0.html @@ -777,7 +777,9 @@
  • 03.09.2017 REGION: fixed a problem with ds9 regions format not printing coordinate system in rare cases
  • 03.09.2017 PANNER: limit how small panner highlite box is displayed in cases where zoomed in.
  • 03.10.2017 REGIONS: fixed a problem with reading XML files with optional region parameters.
  • -
  • 03.15.2017 IIS: fixed a minor problem if encode WCS is not LINEAR.
  • +
  • 03.16.2017 IIS: fixed a minor problem if encode WCS is not LINEAR.
  • +
  • 03.16.2017 IIS: fixed a problem with colorscale values.
  • +
  • 03.16.2017 IIS: add check to prevent segv in case of mismatch between buffer sizes.
  • 03.21.2017 RELEASE version 7.6b1
  • diff --git a/tksao/fitsy++/iis.C b/tksao/fitsy++/iis.C index 588b8a4..56a4652 100644 --- a/tksao/fitsy++/iis.C +++ b/tksao/fitsy++/iis.C @@ -50,7 +50,8 @@ char* FitsIIS::get(int xx, int yy, int dx, int dy) char* dptr = dest; char* sptr = (char*)data_ + ((hh-1)-yy)*ww + xx; - while (ll) { + + while (ll>0) { memcpy(dptr, sptr, ww); sptr -= ww; dptr += ww; @@ -69,7 +70,8 @@ void FitsIIS::set(const char* src, int xx, int yy, int dx, int dy) char* sptr = (char*)src; char* dptr = (char*)data_ + ((hh-1)-yy)*ww + xx; - while (ll) { + + while (ll>0) { memcpy(dptr, sptr, ww); sptr += ww; dptr -= ww; -- cgit v0.12