diff options
author | Maxim Sobolev <sobomax@FreeBSD.org> | 2004-06-08 06:27:43 +0000 |
---|---|---|
committer | Maxim Sobolev <sobomax@FreeBSD.org> | 2004-06-08 06:27:43 +0000 |
commit | f0629da70da12d52fbe62c04185588e51af29a9f (patch) | |
tree | 0628dea60c820c81af2000cbf8a669948b720917 /devel/pwlib/files | |
parent | 5d8de5067bbc3723262214ee75b85fb4fcca453e (diff) | |
download | ports-f0629da70da12d52fbe62c04185588e51af29a9f.tar.gz ports-f0629da70da12d52fbe62c04185588e51af29a9f.zip |
Notes
Diffstat (limited to 'devel/pwlib/files')
-rw-r--r-- | devel/pwlib/files/patch-src::ptclib::asner.cxx | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/devel/pwlib/files/patch-src::ptclib::asner.cxx b/devel/pwlib/files/patch-src::ptclib::asner.cxx new file mode 100644 index 000000000000..4776c3cab7f4 --- /dev/null +++ b/devel/pwlib/files/patch-src::ptclib::asner.cxx @@ -0,0 +1,58 @@ + +$FreeBSD$ + +--- src/ptclib/asner.cxx 2004/06/03 14:44:43 1.1 ++++ src/ptclib/asner.cxx 2004/06/03 14:50:35 +@@ -4926,6 +4926,11 @@ + return -1; + + value += lower; ++ ++ // clamp value to upper limit ++ if (value > upper) ++ value = upper; ++ + return 0; + } + +@@ -4970,7 +4975,13 @@ + unsigned base; + if (!MultiBitDecode(CountBits(upper - lower + 1), base)) + return -1; +- return lower + base; // 10.9.4.1 ++ len = lower + base; // 10.9.4.1 ++ ++ // clamp value to upper limit ++ if (len > upper) ++ len = upper; ++ ++ return len; + } + + if (upper < 65536) // 10.9.3.3 +@@ -4981,13 +4992,20 @@ + if (IsAtEnd()) + return -1; + +- if (SingleBitDecode() == 0) +- return MultiBitDecode(7, len) ? 0 : -1; // 10.9.3.6 ++ if (SingleBitDecode() == 0) { ++ if (!MultiBitDecode(7, len)) // 10.9.3.6 ++ return -1; // 10.9.3.8 unsupported ++ } ++ else if (SingleBitDecode() == 0) { ++ if (!MultiBitDecode(14, len)) // 10.9.3.7 ++ return -1; // 10.9.3.8 unsupported ++ } + +- if (SingleBitDecode() == 0) +- return MultiBitDecode(14, len) ? 0 : -1; // 10.9.3.7 ++ // clamp value to upper limit ++ if (len > upper) ++ len = upper; + +- return -1; // 10.9.3.8 unsupported ++ return 0; + } + + |