<?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/os2linux/bugs/" rel="alternate"/><link href="https://sourceforge.net/p/os2linux/bugs/feed.atom" rel="self"/><id>https://sourceforge.net/p/os2linux/bugs/</id><updated>2005-06-29T14:07:05Z</updated><subtitle>Recent changes to bugs</subtitle><entry><title>Invalid Buffer in DosGetMessage</title><link href="https://sourceforge.net/p/os2linux/bugs/1/" rel="alternate"/><published>2005-06-29T14:07:05Z</published><updated>2005-06-29T14:07:05Z</updated><author><name>David Ashley</name><uri>https://sourceforge.net/u/wdashley/</uri></author><id>https://sourceforge.net249905227d79d616c5e82dbc1a68981b692d9d7e</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;I found a bug in the implementation of DosGetMessage. &lt;br /&gt;
It seems the call to "catclose" should be made after&lt;br /&gt;
the strcpy call that uses "catPtr".  Right now, the&lt;br /&gt;
catalog is closed before the string copy and that&lt;br /&gt;
results in a segmentation violation because the memory&lt;br /&gt;
associated with catPtr gets free'd in the close call. &lt;br /&gt;
Also, you might consider using "strncpy" rather than&lt;br /&gt;
"strcpy" to avoid overwriting the target buffer if the&lt;br /&gt;
message is too long.&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>