mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
Fix VC compilation as variable size array is not supported
This commit is contained in:
parent
04db3d0f7a
commit
f96df64cb2
1 changed files with 9 additions and 0 deletions
|
@ -2277,7 +2277,12 @@ size_t php_mysqlnd_cached_sha2_result_write(void * _packet)
|
|||
MYSQLND_PFC * pfc = packet->header.protocol_frame_codec;
|
||||
MYSQLND_VIO * vio = packet->header.vio;
|
||||
MYSQLND_STATS * stats = packet->header.stats;
|
||||
#ifndef _MSC_VER
|
||||
zend_uchar buffer[MYSQLND_HEADER_SIZE + packet->password_len + 1];
|
||||
#else
|
||||
ALLOCA_FLAG(use_heap)
|
||||
zend_uchar *buffer = do_alloca(MYSQLND_HEADER_SIZE + packet->password_len + 1, use_heap);
|
||||
#endif
|
||||
size_t sent;
|
||||
|
||||
DBG_ENTER("php_mysqlnd_cached_sha2_result_write");
|
||||
|
@ -2290,6 +2295,10 @@ size_t php_mysqlnd_cached_sha2_result_write(void * _packet)
|
|||
sent = pfc->data->m.send(pfc, vio, buffer, packet->password_len, stats, error_info);
|
||||
}
|
||||
|
||||
#ifdef _MSC_VER
|
||||
free_alloca(buffer, use_heap);
|
||||
#endif
|
||||
|
||||
DBG_RETURN(sent);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue