File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
lldb/tools/debugserver/source Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -4519,12 +4519,12 @@ rnb_err_t RNBRemote::HandlePacket_qSpeedTest(const char *p) {
4519
4519
return HandlePacket_ILLFORMED (
4520
4520
__FILE__, __LINE__, p,
4521
4521
" Didn't find response_size value at right offset" );
4522
- else if (*end == ' ;' ) {
4523
- static char g_data[ 4 * 1024 * 1024 + 16 ] ;
4524
- strcpy (g_data , " data:" );
4525
- memset (g_data + 5 , ' a ' , response_size) ;
4526
- g_data[response_size + 5 ] = ' \0 ' ;
4527
- return SendPacket (g_data) ;
4522
+ else if (*end == ' ;' && response_size < ( 4 * 1024 * 1024 ) ) {
4523
+ std::vector< char > buf (response_size + 6 , ' a ' ) ;
4524
+ memcpy (buf. data () , " data:" , 5 );
4525
+ buf[buf. size () - 1 ] = ' \0 ' ;
4526
+ rnb_err_t return_value = SendPacket (buf. data ()) ;
4527
+ return return_value ;
4528
4528
} else {
4529
4529
return SendErrorPacket (" E79" );
4530
4530
}
You can’t perform that action at this time.
0 commit comments