<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to patches</title><link>https://sourceforge.net/p/klavaro/patches/</link><description>Recent changes to patches</description><atom:link href="https://sourceforge.net/p/klavaro/patches/feed.rss" rel="self"/><language>en</language><lastBuildDate>Sat, 26 Nov 2022 00:22:29 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/klavaro/patches/feed.rss" rel="self" type="application/rss+xml"/><item><title>#18 fix use-after-free / fixup trans_lang_get_similar</title><link>https://sourceforge.net/p/klavaro/patches/18/?limit=50#8f18</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;Ok, I have understood now. I'll apply the patch in next release, 3.14. Thank you very much!&lt;/p&gt;
&lt;p&gt;I had tested a lot that function and it was working even with a pointer copy: strangely, the original pointer got modified by the local assignments (g_free, g_strdup, etc). But I understand that this is not the expected behavior, so I have fixed accordingly to your remark.&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Felipe Castro</dc:creator><pubDate>Sat, 26 Nov 2022 00:22:29 -0000</pubDate><guid>https://sourceforge.netcdee8dc930b70b1c850f0f19316dd7699a0935d6</guid></item><item><title>#18 fix use-after-free / fixup trans_lang_get_similar</title><link>https://sourceforge.net/p/klavaro/patches/18/?limit=25#8e75</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;Without the patch it modifies a copy, not the original, that's the bug.&lt;/p&gt;
&lt;p&gt;Look at the code paths exiting that function (lines modified by this patch) that do...&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="n"&gt;free&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;test&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="n"&gt;test&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;strdup&lt;/span&gt;&lt;span class="p"&gt;(...);&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="k"&gt;return&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;TRUE&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;This allocates a string and stores the pointer to it in the function-local &lt;code&gt;char *&lt;/code&gt; "test" which is immediately leaked and does not modify or write to the address of the original.&lt;br/&gt;
The original still points at what it did previously, memory which has now been freed.&lt;/p&gt;
&lt;p&gt;To store the &lt;code&gt;char *&lt;/code&gt; of the new string (returned from &lt;code&gt;strdup&lt;/code&gt;) into the original variable (in the caller of this function) you should have a pointer to the original variable (&lt;code&gt;char **&lt;/code&gt;), which is what this patch fixes.  To update the original you need to pass its address so it can be updated, hence the '&amp;amp;'.&lt;/p&gt;
&lt;p&gt;This is a real bug, and needed to be fixed to avoid crashing on every launch when packaging.  Please look again?&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Will Dietz</dc:creator><pubDate>Fri, 25 Nov 2022 02:56:32 -0000</pubDate><guid>https://sourceforge.netbf5de9489af40133915ea001038c1267af92aa78</guid></item><item><title>#19 update icon names to non-deprecated replacements (since GTK 3.10)</title><link>https://sourceforge.net/p/klavaro/patches/19/?limit=50#304c</link><description>&lt;div class="markdown_content"&gt;&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;status&lt;/strong&gt;: open --&amp;gt; closed&lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Felipe Castro</dc:creator><pubDate>Thu, 24 Nov 2022 23:08:15 -0000</pubDate><guid>https://sourceforge.net36f989f7685ef91ff9e63044be56b54cc0c0efe8</guid></item><item><title>#17 Add missing semicolon at the end of klavaro.desktop's keyword entries</title><link>https://sourceforge.net/p/klavaro/patches/17/?limit=50#07e1</link><description>&lt;div class="markdown_content"&gt;&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;status&lt;/strong&gt;: open --&amp;gt; closed&lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Felipe Castro</dc:creator><pubDate>Thu, 24 Nov 2022 22:29:22 -0000</pubDate><guid>https://sourceforge.nete68cb9dd6b16463e5d4f88a8892c2a6950da1653</guid></item><item><title>#16 Install metainfo files in 'metainfo' directory (not 'appdata')</title><link>https://sourceforge.net/p/klavaro/patches/16/?limit=50#4f79</link><description>&lt;div class="markdown_content"&gt;&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;status&lt;/strong&gt;: open --&amp;gt; closed&lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Felipe Castro</dc:creator><pubDate>Thu, 24 Nov 2022 22:11:05 -0000</pubDate><guid>https://sourceforge.net21bbe9bd29773cf33a16b2e18381d3aa590edfa8</guid></item><item><title>#18 fix use-after-free / fixup trans_lang_get_similar</title><link>https://sourceforge.net/p/klavaro/patches/18/?limit=50#ed0a</link><description>&lt;div class="markdown_content"&gt;&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;status&lt;/strong&gt;: open --&amp;gt; wont-fix&lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Felipe Castro</dc:creator><pubDate>Thu, 24 Nov 2022 21:59:12 -0000</pubDate><guid>https://sourceforge.net3999de18f2a09f3147c81695fdfce7588abf96a1</guid></item><item><title>update icon names to non-deprecated replacements (since GTK 3.10)</title><link>https://sourceforge.net/p/klavaro/patches/19/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;Many of the references icon names are deprecated and don't appear in recent themes.&lt;/p&gt;
&lt;p&gt;To work with these systems, update the various icons (mostly &lt;code&gt;gtk-*&lt;/code&gt;) to their new names.&lt;/p&gt;
&lt;p&gt;A few were left where the deprecation advice was to not use an icon but instead use a label.  Those icons don't appear missing in themes I checked anyway.&lt;/p&gt;
&lt;p&gt;Fixes missing icons when executing on systems without the old icons/names.&lt;/p&gt;
&lt;p&gt;Deprecation notices mention this has been deprecated since GTK 3.10, which came out in 2013.&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Will Dietz</dc:creator><pubDate>Mon, 14 Mar 2022 14:02:45 -0000</pubDate><guid>https://sourceforge.netcd9b4ac493d7a59c18f43f2372b65dd1db807e91</guid></item><item><title>update icon names to non-deprecated replacements (since GTK 3.10)</title><link>https://sourceforge.net/p/klavaro/patches/19/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;Ticket 19 has been modified: update icon names to non-deprecated replacements (since GTK 3.10)&lt;br/&gt;
Edited By: Felipe Castro (felipo)&lt;br/&gt;
Status updated: 'open' =&amp;gt; 'closed'&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Will Dietz</dc:creator><pubDate>Mon, 14 Mar 2022 14:02:45 -0000</pubDate><guid>https://sourceforge.net0dc74df698ccb761633d7ccceb67805e920b14a0</guid></item><item><title>fix use-after-free / fixup trans_lang_get_similar</title><link>https://sourceforge.net/p/klavaro/patches/18/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;Fix memory corruption / use-after-free when setting up language.&lt;/p&gt;
&lt;p&gt;Basically this method seems intended to change the &lt;code&gt;char *&lt;/code&gt; in the caller, but instead changes only its local copy which is especially bad because it frees the original memory first.  This leads to crashing or other bugs.&lt;br/&gt;
Fix this by passing a &lt;code&gt;char **&lt;/code&gt; and accessing it indirectly.&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Will Dietz</dc:creator><pubDate>Mon, 14 Mar 2022 13:55:15 -0000</pubDate><guid>https://sourceforge.net132afe2f00dad51b994cb0aeac1452e00ae76aef</guid></item><item><title>fix use-after-free / fixup trans_lang_get_similar</title><link>https://sourceforge.net/p/klavaro/patches/18/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;Ticket 18 has been modified: fix use-after-free / fixup trans_lang_get_similar&lt;br/&gt;
Edited By: Felipe Castro (felipo)&lt;br/&gt;
Status updated: 'open' =&amp;gt; 'wont-fix'&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Will Dietz</dc:creator><pubDate>Mon, 14 Mar 2022 13:55:15 -0000</pubDate><guid>https://sourceforge.net8cee680d608a0a2aaff1de628d510d2046997185</guid></item></channel></rss>