summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilliam Joye <wjoye@cfa.harvard.edu>2017-03-16 19:57:45 (GMT)
committerWilliam Joye <wjoye@cfa.harvard.edu>2017-03-16 19:57:45 (GMT)
commitfc66534c90cac1720fd140ddb13ffc9353369c1d (patch)
treeb1bf385f0fb0dddcc7c59d86b07f5d9d0795aa7c
parent56720ad9621d59f7296a84fe0301376ce83674a0 (diff)
downloadblt-fc66534c90cac1720fd140ddb13ffc9353369c1d.zip
blt-fc66534c90cac1720fd140ddb13ffc9353369c1d.tar.gz
blt-fc66534c90cac1720fd140ddb13ffc9353369c1d.tar.bz2
IIS: add check to prevent segv in case of mismatch between buffer sizes
-rw-r--r--ds9/doc/release/r7.0.html4
-rw-r--r--tksao/fitsy++/iis.C6
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 @@
<li><tt>03.09.2017 REGION: fixed a problem with ds9 regions format not printing coordinate system in rare cases</tt></li>
<li><tt>03.09.2017 PANNER: limit how small panner highlite box is displayed in cases where zoomed in.</tt></li>
<li><tt>03.10.2017 REGIONS: fixed a problem with reading XML files with optional region parameters.</tt></li>
- <li><tt>03.15.2017 IIS: fixed a minor problem if encode WCS is not LINEAR.</tt></li>
+ <li><tt>03.16.2017 IIS: fixed a minor problem if encode WCS is not LINEAR.</tt></li>
+ <li><tt>03.16.2017 IIS: fixed a problem with colorscale values.</tt></li>
+ <li><tt>03.16.2017 IIS: add check to prevent segv in case of mismatch between buffer sizes.</tt></li>
<li><tt><b>03.21.2017 RELEASE version 7.6b1</b></tt></li>
</ol>
</ol>
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;