Update of bug #68794 (group groff):
Planned Release: None => 1.25.0
Summary: [troff] assertion failure when `evc` request given
invalid identifier => [PATCH] [troff] assertion failure when `evc` request
given invalid identifier
_______________________________________________________
Follow-up Comment #1:
Proposed patch:
commit a0703b7ad88be23df2fbcfe078b1dfdc8077d476
Author: G. Branden Robinson <[email protected]>
Date: Sun Oct 18 09:47:18 2026 -0500
XXX [troff]: Fix Savannah #68794.
* src/roff/troff/env.cpp (environment_copy): Instead of throwing
assert(3)ion when given invalid environment identifier, perform no
operation.
diff --git a/src/roff/troff/env.cpp b/src/roff/troff/env.cpp
index 4e4b7b7f6..2476b6bb8 100644
--- a/src/roff/troff/env.cpp
+++ b/src/roff/troff/env.cpp
@@ -3881,13 +3881,14 @@ static void environment_copy() // .evc
environment *e = 0 /* nullptr */;
tok.skip_spaces();
symbol nm = read_long_identifier();
- assert(nm != 0 /* nullptr */);
- e = static_cast<environment *>(env_dictionary.lookup(nm));
- if (e != 0 /* nullptr */)
- curenv->copy(e);
- else
- error("cannot copy from nonexistent environment '%1'",
- nm.contents());
+ if (!nm.is_null()) {
+ e = static_cast<environment *>(env_dictionary.lookup(nm));
+ if (e != 0 /* nullptr */)
+ curenv->copy(e);
+ else
+ error("cannot copy from nonexistent environment '%1'",
+ nm.contents());
+ }
skip_line();
}
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?68794>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
signature.asc
Description: PGP signature
