是什么----什么恶意的StringBuilder.ToString()的范围内? [英] What does ----s mean in the context of StringBuilder.ToString()?

查看:227
本文介绍了是什么----什么恶意的StringBuilder.ToString()的范围内?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

借助参考源页stringbuilder.cs 已经在<此评论code>的ToString 方法:

if (chunk.m_ChunkLength > 0)
{
    // Copy these into local variables so that they 
    // are stable even in the presence of ----s (hackers might do this)
    char[] sourceArray = chunk.m_ChunkChars;
    int chunkOffset = chunk.m_ChunkOffset;
    int chunkLength = chunk.m_ChunkLength;



这是什么意思?为 ----小号东西恶意用户可能会插入到被格式化字符串?

What does this mean? Is ----s something a malicious user might insert into a string to be formatted?

推荐答案

在CoreCLR库,你有一个更全面的报价:

In the CoreCLR repository you have a fuller quote:

复制到这些本地变量,使他们稳定甚至在竞争条件

Copy these into local variables so that they are stable even in the presence of race conditions

Github上

基本上:这是一个线程考虑

Basically: it's a threading consideration.

这篇关于是什么----什么恶意的StringBuilder.ToString()的范围内?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆