slang-users mailing list

[2004 Date Index] [2004 Thread Index] [Other years]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]

[slang-users] Re: Screen wider than 256 chars


Hello,
John has tracked down and fixed the issue. I attached a patch and his
original eMail.

	Thomas
===== src/misc.c 1.1 vs edited =====
--- 1.1/src/misc.c	2004-08-16 14:22:42 +02:00
+++ edited/src/misc.c	2004-09-09 00:16:59 +02:00
@@ -2066,6 +2066,9 @@
    if ((str == NULL) && (dfl == NULL)) return -1;
    
    Slrn_Keymap_RLI->edit_width = SLtt_Screen_Cols - 1;
+   if (Slrn_Keymap_RLI->edit_width > Slrn_Keymap_RLI->buf_len)
+	   Slrn_Keymap_RLI->edit_width = Slrn_Keymap_RLI->buf_len;
+
    Slrn_Keymap_RLI->prompt = prompt;
    *Slrn_Keymap_RLI->buf = 0;
 
--- Begin Message ---
Thomas Glanzmann <sithglan@xxxxxxxxxxxxxxxxxxxx> wrote:
>Debian Sarge. Yes, it has a JUMBO UTF8 patch in. But I can also
>reproduce this issue with plain slang build on Solaris 8.

In this case, I believe that it is an slrn bug.  Comparing the slrn
0.9.8.0 code with the 0.9.6.3 code for the function
generic_read_input, I see that a buffer size check that was in version
0.9.6.3 has been dropped in the newer versions.  In particular,
0.9.8.0 has:

   Slrn_Keymap_RLI->edit_width = SLtt_Screen_Cols - 1;

whereas 0.9.6.3 has:

   Slrn_Keymap_RLI->edit_width = SLtt_Screen_Cols - 1;
   if (Slrn_Keymap_RLI->edit_width > Slrn_Keymap_RLI->buf_len)
     Slrn_Keymap_RLI->edit_width = Slrn_Keymap_RLI->buf_len;

You might trying adding this check to your slrn code and if it solves
the problem, submit the patch to the current slrn maintainer.

For what its worth, slang 2 does not have the arbitray limit that
slang 1 has.

Thanks,
--John


--- End Message ---
_______________________________________________
To unsubscribe, visit http://jedsoft.org/slang/mailinglists.html

[2004 date index] [2004 thread index]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]