diff options
author | Kunht Kun <kunhtkun@gmail.com> | 2022-03-12 00:04:10 -0500 |
---|---|---|
committer | Martin Michlmayr <tbm@cyrius.com> | 2022-03-12 17:11:55 +0800 |
commit | ddc8fcf66fd04dd3685a7788d62c2a00ce2a27ee (patch) | |
tree | 7c7ec18e1f0bf59bb4faf87151d259c87ed4b12d /test | |
parent | ba8ec32435313b4749a3733071b3184ca6bd8e14 (diff) | |
download | fork-ledger-ddc8fcf66fd04dd3685a7788d62c2a00ce2a27ee.tar.gz fork-ledger-ddc8fcf66fd04dd3685a7788d62c2a00ce2a27ee.tar.bz2 fork-ledger-ddc8fcf66fd04dd3685a7788d62c2a00ce2a27ee.zip |
Avoid dereferencing null pointer
Here `comm` could be a null pointer (the new test regress/2057 shows
such a case). So test it before dereferencing to avoid segfault.
Re: #2057
Diffstat (limited to 'test')
-rw-r--r-- | test/regress/2057.test | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/regress/2057.test b/test/regress/2057.test new file mode 100644 index 00000000..f691b350 --- /dev/null +++ b/test/regress/2057.test @@ -0,0 +1,12 @@ +C 1 "" = 1 $ + +2021-01-01 Test + A $10 + B + +test bal + 10 A + -10 B +-------------------- + 0 +end test |