unstick r1874011

Revision 1874011

Date:
2020/02/14 10:47:36
Author:
jorton
Revision Log:
* server/mpm/event/event.c (event_open_logs): Avoid UBSan exception
calling memcpy(,NULL,0) at startup. Thanks to rpluem.
Files:

Legend:

 
Added
 
Removed
 
Modified
  • httpd/httpd/trunk/server/mpm/event/event.c

     
    3616 3616 new_max = num_buckets;
    3617 3617 }
    3618 3618 new_ptr = (int *)apr_palloc(ap_pglobal, new_max * sizeof(int));
    3619 memcpy(new_ptr, retained->idle_spawn_rate,
    3620 retained->mpm->num_buckets * sizeof(int));
    3619 if (retained->idle_spawn_rate) /* NULL at startup */
    3620 memcpy(new_ptr, retained->idle_spawn_rate,
    3621 retained->mpm->num_buckets * sizeof(int));
    3621 3622 retained->idle_spawn_rate = new_ptr;
    3622 3623 retained->mpm->max_buckets = new_max;
    3623 3624 }