-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Relax checks for extended capability to support new format #5
Conversation
Hmm, diff --git i/unibilium.c w/unibilium.c
index 8586b6f..64472de 100644
--- i/unibilium.c
+++ w/unibilium.c
@@ -339,6 +339,8 @@ unibi_term *unibi_from_mem(const char *p, size_t n) {
extalllen += extnumlen;
extalllen += extstrslen;
+ DEL_FAIL_IF(extofflen != extalllen + extstrslen, EINVAL, t);
+
DEL_FAIL_IF(
n <
extboollen + |
To be clear: I'd expected the test to fail then. |
We need this stuff in the 0.4 release, so would be better to merge now and ask questions later .. ping @jamessan anyway :) |
Yeah :) - but it's not like we need to hurry it "just because", without waiting a few days at least. |
Hmm, guess I didn't choose a good terminfo entry to use for the test. |
@jamessan |
Ok. I've used the screen terminfo from mauke#40, and when generating the test for it it fails without the patch to
With this patch it works, and the output is the same. So the problem with the test not failing is that the patch is needed in the first place to generate the test, which is then using Therefore I think the patch is good, but the test adds no benefit (at least with regard to the patch). |
Should be good now.
This ships |
In the 20180331 release, the format was slightly changed: > 20180331 > + improve terminfo write/read by modifying the fourth item of the > extended header to denote the number of valid strings in the extended > string table (prompted by a comment in unibilium's sources). Since the number of valid string capabilities is not necessarily the same as extstrslen, it's not possible to sanity check the total number of items up front anymore. Include a new test with an updated screen terminfo dump.
In the 20180331 release, the format was slightly changed:
Since the number of valid string capabilities is not necessarily the
same as extstrslen, it's not possible to sanity check the total number
of items up front anymore.
Include a new test with an updated screen terminfo dump.