You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@axis.apache.org by "Bill Blough (Jira)" <ji...@apache.org> on 2020/04/07 16:33:00 UTC
[jira] [Updated] (AXIS2C-1461) axutil_allocator_init(): unsafe
memset() call
[ https://issues.apache.org/jira/browse/AXIS2C-1461?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Bill Blough updated AXIS2C-1461:
--------------------------------
Fix Version/s: 1.7.0
> axutil_allocator_init(): unsafe memset() call
> ---------------------------------------------
>
> Key: AXIS2C-1461
> URL: https://issues.apache.org/jira/browse/AXIS2C-1461
> Project: Axis2-C
> Issue Type: Bug
> Components: util
> Affects Versions: 1.6.0, Current (Nightly)
> Reporter: Olivier Mengué
> Priority: Major
> Fix For: 1.7.0
>
>
> In axutil_allocator_init(), memset() is called before checking if the malloc() call succeed.
> 36 AXIS2_EXTERN axutil_allocator_t *AXIS2_CALL
> 37 axutil_allocator_init(
> 38 axutil_allocator_t * allocator)
> 39 {
> 40 if(allocator)
> 41 return allocator;
> 42
> 43 else
> 44 {
> 45 allocator = (axutil_allocator_t *)malloc(sizeof(axutil_allocator_t));
> 46 memset(allocator, 0, sizeof(axutil_allocator_t));
> 47 if(allocator)
> 48 {
> 49 allocator->malloc_fn = axutil_allocator_malloc_impl;
> 50 allocator->realloc = axutil_allocator_realloc_impl;
> 51 allocator->free_fn = axutil_allocator_free_impl;
> 52 allocator->global_pool_ref = 0;
> 53
> 54 return allocator;
> 55 }
> 56 }
> 57 return NULL;
> 58 }
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: c-dev-help@axis.apache.org