Description
sapi/litespeed/lsapi_main.c:
static size_t sapi_lsapi_ub_write(const char *str, size_t str_length)
{
int ret;
int remain;
if ( lsapi_mode ) {
ret = LSAPI_Write( str, str_length );
if ( ret < str_length ) {
php_handle_aborted_connection();
return str_length - ret;
}
} else {
remain = str_length;
while( remain > 0 ) {
ret = write( 1, str, remain );
if ( ret <= 0 ) {
php_handle_aborted_connection();
return str_length - remain;
}
str += ret;
remain -= ret;
}
}
return str_length;
}
It seems to me that LSAPI_Write returns the number of bytes written. If this is less than the length of the string, something went wrong. But it then returns str_length - ret, where it should return ret.
PHP Version
Operating System
No response
Description
sapi/litespeed/lsapi_main.c:
It seems to me that
LSAPI_Writereturns the number of bytes written. If this is less than the length of the string, something went wrong. But it then returnsstr_length - ret, where it should returnret.PHP Version
Operating System
No response