Bug 173822

Summary: memory handling errors
Product: [Fedora] Fedora Reporter: Bill Nottingham <notting>
Component: gokAssignee: Matthias Clasen <mclasen>
Status: CLOSED RAWHIDE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: rvokal
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-11-21 18:43:37 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Bill Nottingham 2005-11-21 16:35:40 UTC
Noted by Arjan - it's caught by the build time checks in dist-fc5.

On Fri, Nov 18, 2005 at 11:11:49PM -0500, Compile Server wrote:
> Results of the security check for gok
> .
> see http://intranet.corp.redhat.com/ic/intranet/SecurityBuildWarning.html for
more information
> .
> Buffer overflow checks:
> .
> .
> Other dangerous warnings:
>
/mnt/redhat/beehive/logs/gok-644934-i386-ls20-bc1-13.build.redhat.com.log:arraylist.c:121:
warning: ignoring return value of 'realloc', declared with attribute
warn_unused_result

              if (new_capacity > new_size)
                {
                  realloc(list->_data, object_size * new_capacity);
                  list->_current_capacity = new_capacity;
                }


obvious bug ;)

>
/mnt/redhat/beehive/logs/gok-644934-i386-ls20-bc1-13.build.redhat.com.log:arraylist.c:168:
warning: ignoring return value of 'realloc', declared with attribute
warn_unused_result

void arraylist_clear(const Arraylist list)
{
  realloc(list->_data, object_size * ARRAYLIST_INITIAL_CAPACITY);
  list->_current_capacity = ARRAYLIST_INITIAL_CAPACITY;
  list->_size = 0;
}



same obvious bug....

Comment 1 Matthias Clasen 2005-11-21 18:43:37 UTC
Fixed in gok-1.0.5-5, filed upstream here:
http://bugzilla.gnome.org/show_bug.cgi?id=322062