<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent changes to bugs</title><link href="https://sourceforge.net/p/nedit/bugs/" rel="alternate"/><link href="https://sourceforge.net/p/nedit/bugs/feed.atom" rel="self"/><id>https://sourceforge.net/p/nedit/bugs/</id><updated>2023-09-09T07:15:27.382000Z</updated><subtitle>Recent changes to bugs</subtitle><entry><title>Buffer overflow</title><link href="https://sourceforge.net/p/nedit/bugs/693/" rel="alternate"/><published>2023-09-09T07:15:27.382000Z</published><updated>2023-09-09T07:15:27.382000Z</updated><author><name>Finn Thain</name><uri>https://sourceforge.net/u/fthain/</uri></author><id>https://sourceforge.net42d977da71bea7963394d64fbc7f9ac2f767a34e</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;There is an old crashing bug which I've been ignoring for ten years or so but finally got around to patching. It's easy to reproduce. Start nedit, select "Execute command line" from the "Shell" menu and click "OK". As I recall, doing that was always fatal for my i686-pc-linux-gnu builds on Gentoo/Linux. The problem is detected thanks to the stack smashing protector. It's caused (in part) by a bogus line number. Please see attached patch. The patch is not a complete solution but it does prevent the crash by use of a little defensive programming.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>#692 Can't enter numbers on numeric keypad</title><link href="https://sourceforge.net/p/nedit/bugs/692/?limit=25#eee6" rel="alternate"/><published>2023-04-30T08:02:01.700000Z</published><updated>2023-04-30T08:02:01.700000Z</updated><author><name>Alex Hajnal</name><uri>https://sourceforge.net/u/ahajnal/</uri></author><id>https://sourceforge.net657960fbd6662c3b86ba9e1357b2b07548394ff9</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;It turns out that this was &lt;a class="" href="https://sourceforge.net/p/xnedit/code/ci/1d305b5d5b9ca931f48f3334013c499d0949ba5f/"&gt;fixed&lt;/a&gt; in a newer version of &lt;code&gt;xnedit&lt;/code&gt; and that fix also works for &lt;code&gt;nedit&lt;/code&gt;.  I still think the underlying issue is in &lt;code&gt;libXt&lt;/code&gt; but this fix works and that's what matters.&lt;/p&gt;
&lt;p&gt;The attached patch fixes the issue for &lt;code&gt;nedit&lt;/code&gt;.  The suggestions I made in my initial bug report should be ignored.&lt;/p&gt;
&lt;p&gt;Credit goes to &lt;a class="" href="https://sourceforge.net/u/pyrphoros/"&gt;Olaf Wintermann&lt;/a&gt; for the fix in &lt;code&gt;xnedit&lt;/code&gt; that this patch is based on.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>#692 Can't enter numbers on numeric keypad</title><link href="https://sourceforge.net/p/nedit/bugs/692/?limit=25#b26a" rel="alternate"/><published>2023-04-28T10:49:56.946000Z</published><updated>2023-04-28T10:49:56.946000Z</updated><author><name>Alex Hajnal</name><uri>https://sourceforge.net/u/ahajnal/</uri></author><id>https://sourceforge.netb0a99959a361059895a5e7e32e122352057d63c6</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Related: &lt;a class="" href="https://sourceforge.net/p/xnedit/bugs/27/"&gt;Link to &lt;code&gt;xnedit&lt;/code&gt; bug report&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Can't enter numbers on numeric keypad</title><link href="https://sourceforge.net/p/nedit/bugs/692/" rel="alternate"/><published>2023-04-28T10:46:50.865000Z</published><updated>2023-04-28T10:46:50.865000Z</updated><author><name>Alex Hajnal</name><uri>https://sourceforge.net/u/ahajnal/</uri></author><id>https://sourceforge.net9bd12ecd6c62ca9d217a0501c6467c2e59a28788</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;On some platforms the numeric keypad is stuck in navigation mode (irrespective &lt;br/&gt;
of the NumLock state)&lt;span&gt;[1]&lt;/span&gt;.  I believe I've isolated the source of the problem &lt;br/&gt;
to &lt;code&gt;libXt&lt;/code&gt;, specifically when it is compiled with Xkb support&lt;span&gt;[2]&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;I've submitted a bug report to &lt;code&gt;libXt&lt;/code&gt; but there are a few ways to work around &lt;br/&gt;
or fix this issue in &lt;code&gt;nedit&lt;/code&gt;&lt;span&gt;[3]&lt;/span&gt;:&lt;/p&gt;
&lt;p&gt;1) Work-around: Run nedit using &lt;code&gt;XKB_DISABLE=1 nedit&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;2) Temporary fix: Edit &lt;code&gt;nedit.c&lt;/code&gt; and insert the following line immediately &lt;br/&gt;
before the &lt;code&gt;TheDisplay = XtOpenDisplay(...)&lt;/code&gt; call:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;putenv("XKB_DISABLE=1");&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Note that either of these effectively disables &lt;code&gt;Xkb&lt;/code&gt; support so may have &lt;br/&gt;
knock-on effects.&lt;/p&gt;
&lt;p&gt;3) Proper fix: Correct the issue in &lt;code&gt;libXt&lt;/code&gt; (assuming the problem actually lies &lt;br/&gt;
there).  This is outside the scope of this bug report.&lt;/p&gt;
&lt;hr/&gt;
&lt;p&gt;Links to related bug reports:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a class="" href="https://gitlab.freedesktop.org/xorg/lib/libxt/-/issues/16" rel="nofollow"&gt;libXt&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;xnedit TBD&lt;/li&gt;
&lt;li&gt;&lt;a class="" href="https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=807653" rel="nofollow"&gt;nedit Debian&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;hr/&gt;
&lt;p&gt;&lt;span&gt;[1]&lt;/span&gt; Except for the &lt;code&gt;5&lt;/code&gt; key which does follow &lt;code&gt;NumLock&lt;/code&gt;.  This was first observed &lt;br/&gt;
by myself on Ubuntu 22.04 (&lt;code&gt;jammy&lt;/code&gt;).&lt;/p&gt;
&lt;p&gt;&lt;span&gt;[2]&lt;/span&gt; The problem seems to lie in &lt;code&gt;libXt&lt;/code&gt;’s &lt;code&gt;XtTranslateKey(...)&lt;/code&gt; function (in &lt;br/&gt;
&lt;code&gt;src/TMkey.c&lt;/code&gt;).  When compiled with &lt;code&gt;Xkb&lt;/code&gt; support this simply makes a call to &lt;br/&gt;
&lt;code&gt;XkbLookupKeySym(...)&lt;/code&gt; and does no further processing.  I believe that what it &lt;br/&gt;
should be doing is then processing the returned “list of modifiers that should &lt;br/&gt;
still be applied” (per the &lt;code&gt;XkbLookupKeySym(3)&lt;/code&gt; manpage).&lt;/p&gt;
&lt;p&gt;&lt;span&gt;[3]&lt;/span&gt; There are suggestions that running &lt;code&gt;setxkbmap -option numpad:mac&lt;/code&gt; will &lt;br/&gt;
fix the problem however I found that this works only occasionally, temporarily, &lt;br/&gt;
and inconsistently.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>#691 Detect strange newlines in certain files</title><link href="https://sourceforge.net/p/nedit/bugs/691/?limit=25#d8a3" rel="alternate"/><published>2022-08-20T18:15:18.908000Z</published><updated>2022-08-20T18:15:18.908000Z</updated><author><name>wesskywalker</name><uri>https://sourceforge.net/u/wesskywalker/</uri></author><id>https://sourceforge.net61c22f3d70a270925af35e4e15d5688262967b52</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;This is the file that has the issue. It's a log generated by mplayer which uses 0x0a to separate normal lines and 0x0d when it outputs the audio and video frames to terminal, so the lines don't advance.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>#691 Detect strange newlines in certain files</title><link href="https://sourceforge.net/p/nedit/bugs/691/?limit=25#61d3" rel="alternate"/><published>2022-08-20T18:14:45.120000Z</published><updated>2022-08-20T18:14:45.120000Z</updated><author><name>wesskywalker</name><uri>https://sourceforge.net/u/wesskywalker/</uri></author><id>https://sourceforge.netf61ab1f1aed065d8c95561f3de6af4614e83e305</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;This is the file that has the issue. It's a log generated by mplayer which uses 0x0a to separate normal lines and 0x0d when it outputs the audio and video frames to terminal, so the lines don't advance.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>#691 Detect strange newlines in certain files</title><link href="https://sourceforge.net/p/nedit/bugs/691/?limit=25#58f8" rel="alternate"/><published>2022-08-19T00:33:33.654000Z</published><updated>2022-08-19T00:33:33.654000Z</updated><author><name>wesskywalker</name><uri>https://sourceforge.net/u/wesskywalker/</uri></author><id>https://sourceforge.nete10394da90124c96353674e7912ee874991941ea</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;md5&lt;br/&gt;
1eb6e4723671a653bb6546434b8f4f0e  weird-newline.txt&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Detect strange newlines in certain files</title><link href="https://sourceforge.net/p/nedit/bugs/691/" rel="alternate"/><published>2022-08-19T00:31:27.491000Z</published><updated>2022-08-19T00:31:27.491000Z</updated><author><name>wesskywalker</name><uri>https://sourceforge.net/u/wesskywalker/</uri></author><id>https://sourceforge.nete3bc1e3359ea808e9e2c58b232990713386f082f</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Certain files have specific newline which some text editors detect properly while other not. Check the file let me know what you think.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>#690 potential buffer overflow in server_common.c</title><link href="https://sourceforge.net/p/nedit/bugs/690/?limit=25#856f" rel="alternate"/><published>2021-08-19T03:26:44.110000Z</published><updated>2021-08-19T03:26:44.110000Z</updated><author><name>Evan Teran</name><uri>https://sourceforge.net/u/eteran/</uri></author><id>https://sourceforge.net6ced3b32c1ee1ea13acb70c90c0a3d2a44ac19e6</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hello kangwoosukeq!&lt;/p&gt;
&lt;p&gt;So two things.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;You are absolutely correct, this is definitely a buffer overflow.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;NEdit 5.x is now considered to be "legacy" and has no planned active development going forward. The good news is that NEdit-NG &lt;a href="https://github.com/eteran/nedit-ng/" rel="nofollow"&gt;https://github.com/eteran/nedit-ng/&lt;/a&gt; is going to be officially considered NEdit 6.0 at some point (hopefully soon, but it's subject to the amount of time I can dedicate to it and for the past several months, I have just been absolutely swamped).&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;NG is is in a very workable state and is only held up from being christened "6.0" by a select few currently outstanding regressions from the 5.x series. (https://github.com/eteran/nedit-ng/milestone/1)&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>potential buffer overflow in server_common.c</title><link href="https://sourceforge.net/p/nedit/bugs/690/" rel="alternate"/><published>2021-08-17T16:55:14.446000Z</published><updated>2021-08-17T16:55:14.446000Z</updated><author><name>Wooseok Kang</name><uri>https://sourceforge.net/u/kangwoosukeq/</uri></author><id>https://sourceforge.net948fb40f7536d694f3fba7096ed284a40d7b099d</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi, there is a potential buffer overflow vulnerability in nedit-5.7.&lt;/p&gt;
&lt;p&gt;These code examples show the vulnerable line in source/server_common.c.&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="mf"&gt;63&lt;/span&gt; &lt;span class="n"&gt;sprintf&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;propName&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"NEDIT_SERVER_EXISTS_%s_%s_%s"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;hostName&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;userName&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;serverName&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="mf"&gt;65&lt;/span&gt; &lt;span class="n"&gt;sprintf&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;propName&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"NEDIT_SERVER_REQUEST_%s_%s_%s"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;hostName&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;userName&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;serverName&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="mf"&gt;94&lt;/span&gt; &lt;span class="n"&gt;sprintf&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;propName&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"NEDIT_FILE_%s_%s_%s_%s_WF_OPEN"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;hostName&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;userName&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;serverName&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;path&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="mf"&gt;108&lt;/span&gt; &lt;span class="n"&gt;sprintf&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;propName&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"NEDIT_FILE_%s_%s_%s_%s_WF_CLOSED"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;hostName&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;userName&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;serverName&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;path&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="mf"&gt;122&lt;/span&gt; &lt;span class="nb"&gt;int&lt;/span&gt; &lt;span class="nb"&gt;len&lt;/span&gt;&lt;span class="n"&gt;gth&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;sprintf&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;propNamePrefix&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"NEDIT_FILE_%s_%s_%s_"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;hostName&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;userName&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;serverName&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;A malicious attack can make 'userName' to arbitrary large string by manipulating environment variable.&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="k"&gt;const&lt;/span&gt; &lt;span class="nb"&gt;char&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="n"&gt;userName&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;GetUserName&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

&lt;span class="n"&gt;util&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;utils&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;c&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;143&lt;/span&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;getenv&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"USER"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Since the size of propName and propNamePrefix are fixed, it can cause stack buffer overflow, which leads to buggy behavior.&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>