Text   |  XML   |  ReML   |   Visible Warnings:

Buffer Underrun  at mempool-system.c:119

No properties have been set. | edit properties
Jump to warning location ↓ warning details...
Show Events | Options

pool_system_realloc

(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib/mempool-system.c)expand/collapse
Show more  
 96  static void *pool_system_realloc(pool_t pool ATTR_UNUSED, void *mem,
 97                                   size_t old_size, size_t new_size)
 98  {
 99          if (unlikely(new_size == 0 || new_size > SSIZE_T_MAX))
 100                  i_panic("Trying to allocate %"PRIuSIZE_T" bytes", new_size);
 101   
 102  #if !defined(USE_GC) && defined(HAVE_MALLOC_USABLE_SIZE)
 103          i_assert(old_size == (size_t)-1 || mem == NULL ||
 104                   old_size <= malloc_usable_size(mem));
 105  #endif
 106   
 107  #ifndef USE_GC 
 108          mem = realloc(mem, new_size);
 109  #else
 110          mem = GC_realloc(mem, new_size);
 111  #endif
 112          if (unlikely(mem == NULL)) {
 113                  i_fatal_status(FATAL_OUTOFMEM, "pool_system_realloc(%"PRIuSIZE_T
 114                                 "): Out of memory", new_size);
 115          }
 116   
 117          if (old_size < new_size) {
 118                  /* clear new data */
 119                  memset((char *) mem + old_size, 0, new_size - old_size);
Show more  




Change Warning 7113.24469 : Buffer Underrun

Priority:
State:
Finding:
Owner:
Note: