On Fri, 29 Nov 2019, Jon Trulson wrote:

#ifndef LinuxDistribution
#define LinuxDistribution      
DefaultLinuxDistribution
#endif


Ahh, I see.  Yeah - I think someone just figured it was easier to set
DefaultLinuxDistribution in imake if redhat or suse were "detected". 

Now I need to check why this expression seems to be always true on my
centos and fedora machines,
I thought it was a cpp syntax problem, but probably it is not.


ok.

In the pipeline:

- dtdocbook stops due to "compress" utility missing (fix being tested)

Yes, someday that will be replaced with gzip I suppose.  It is listed as
a prerequisite though.

I should probably install "ncompress" package, sorry for noise.

- instant tool crashes on locale different than "C"

Crap.  That thing is so delicate.

I fixed that now, it was an one-off error.

So, to get things working on Fedora 30 and Centos 7:

- do not forget to install "ncompress"
- install all locale: for Fedora it's "dnf install glibc-all-langpacks"
- on Centos 7, I have put the following in the config/cf/host.cf file:

#define LinuxDistribution LinuxRedHat
#define TCLLib -ltcl8.5

and, most importantly, the attached patch should fix the crash
during the documentation build.

Marcin
From d6ee9d42be0eb20a436feecc777fb242e98819e1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Marcin=20Cie=C5=9Blak?= <sa...@saper.info>
Date: Sat, 30 Nov 2019 03:56:59 +0100
Subject: [PATCH] dtdocbook/instant: fix buffer overlow on German umlaut in
 latin-1

One-off error:

Old buffer length was 6 for one character (3 * 1 + 3)
We need one more byte in the buffer for the terminating zero.

+0 '"'
+1 '\\'
+2 'x'
+3 'f'
+4 'c'
+5 '"'
+6 0x0 << overflow

tcl combined with RCHECK will abort because memory blocks
are allocated contiguously and we overwrite the magic marker
of the next block.
---
 cde/programs/dtdocbook/instant/main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cde/programs/dtdocbook/instant/main.c 
b/cde/programs/dtdocbook/instant/main.c
index 7dfe91c6..69e752d0 100644
--- a/cde/programs/dtdocbook/instant/main.c
+++ b/cde/programs/dtdocbook/instant/main.c
@@ -359,7 +359,7 @@ static int DefaultOutputString(ClientData clientData,
 
     /* leave room for worst case expansion plus quotes plus null */
     pArgv = argv[1];
-    stringLength = (3 * strlen(pArgv)) + 3;
+    stringLength = (3 * strlen(pArgv)) + 4;
 
     string = Tcl_Alloc(stringLength);
     memset(string, 0, stringLength);
-- 
2.21.0

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

_______________________________________________
cdesktopenv-devel mailing list
cdesktopenv-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cdesktopenv-devel

Reply via email to