mirror of
https://github.com/php/php-src.git
synced 2025-08-15 13:38:49 +02:00
opcache: change uses of sprintf into snprintf
This commit is contained in:
parent
26fcb5f2b2
commit
a4674654ab
2 changed files with 2 additions and 2 deletions
|
@ -16121,7 +16121,7 @@ static const void *zend_jit_trace_allocate_exit_group(uint32_t n)
|
|||
char name[32];
|
||||
|
||||
for (i = 0; i < ZEND_JIT_EXIT_POINTS_PER_GROUP; i++) {
|
||||
sprintf(name, "jit$$trace_exit_%d", n + i);
|
||||
snprintf(name, sizeof(name), "jit$$trace_exit_%d", n + i);
|
||||
ir_disasm_add_symbol(name, (uintptr_t)entry + (i * ZEND_JIT_EXIT_POINTS_SPACING), ZEND_JIT_EXIT_POINTS_SPACING);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -77,7 +77,7 @@ static int create_segments(size_t requested_size, zend_shared_segment_posix ***s
|
|||
shared_segment = (zend_shared_segment_posix *)((char *)(*shared_segments_p) + sizeof(void *));
|
||||
(*shared_segments_p)[0] = shared_segment;
|
||||
|
||||
sprintf(shared_segment_name, "/ZendAccelerator.%d", getpid());
|
||||
snprintf(shared_segment_name, sizeof(shared_segment_name), "/ZendAccelerator.%d", getpid());
|
||||
#if defined(HAVE_SHM_CREATE_LARGEPAGE)
|
||||
if (shared_segment_lg_index > 0) {
|
||||
shared_segment->shm_fd = shm_create_largepage(shared_segment_name, shared_segment_flags, shared_segment_lg_index, SHM_LARGEPAGE_ALLOC_DEFAULT, shared_segment_mode);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue