diff options
author | Jay Berkenbilt <ejb@ql.org> | 2013-10-05 22:37:27 +0200 |
---|---|---|
committer | Jay Berkenbilt <ejb@ql.org> | 2013-10-10 02:57:14 +0200 |
commit | e19eb579b221ade503d7d1ff0a6511d289863785 (patch) | |
tree | 8e0d330ff9d4132eadacc399affb7bcb1a1b5933 /ChangeLog | |
parent | 0bfe9024893ebb1f62108fe6c24410e6ba589c3e (diff) | |
download | qpdf-e19eb579b221ade503d7d1ff0a6511d289863785.tar.zst |
Replace some assertions with std::logic_error
Ideally, the library should never call assert outside of test code,
but it does in several places. For some cases where the assertion
might conceivably fail because of a problem with the input data,
replace assertions with exceptions so that they can be trapped by the
calling application. This commit surely misses some cases and
replaced some cases unnecessarily, but it should still be an
improvement.
Diffstat (limited to 'ChangeLog')
-rw-r--r-- | ChangeLog | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -1,5 +1,10 @@ 2013-10-05 Jay Berkenbilt <ejb@ql.org> + * Replace some assert() calls with std::logic_error exceptions. + Ideally there shouldn't be assert() calls outside of testing. + This change may make a few more potential code errors in handling + invalid data recoverable. + * Security fix: In places where std::vector<T>(size_t) was used, either validate that the size parameter is sane or refactor code to avoid the need to pre-allocate the vector. This reduces the |