buffer too small
2013-02-21 17:43
127 查看
参考网页:/article/2448439.html
今天碰到buffer too small问题,经过调试,原因出在:strState.Format("%s,%s",strState,str1[j]);这句话
参考网页,发现原因
Format中的参数为strstate字符串本身,Format在内部根据格式化参数列表会对字符串本身的内存空间进行重新分配,而如果直接采用字符串本身作为参数传入的话,这个过程中就会造成内存的冲突,而这个冲突是无法预见的。
因此,最好不要采取将字符串本身作为参数作为Format的参数,可以另外定义一个CString变量实现
相关文章推荐
- Buffer is too small
- strcpy_s Buffer is too small 出错根本原因
- ORACLE 函数处理的数据返回值过长 character string buffer too small , WMSYS.WM_CONCAT
- ORA-06502: PL/SQL: numeric or value error: character string buffer too small
- Buffer too small
- ORA-06502:PL/SQL :numberic or value error: character string buffer too small
- C中strcpy_s出现“buffer is too small …… ”问题
- Oracle Error : ORA-22835: Buffer too small for CLOB to CHAR or BLOB to RAW conversion (actual: 3000, maximum: 4000)
- 最近项目在运行时出现"Buffer too small"
- 关于sprintf_s,弹出Expression:(“Buffer too small”,0)
- str.Format 错误 Buffer too small
- the attribute buffer size is too small 解决方法
- xsql---Buffer too small for record data
- PHP调用Oracle存储过程时的错误:ORA-06502: PL/SQL: numeric or value error: character string buffer too small
- How to solve (Buffer too Small".0) problem?
- ORACLE 函数处理的数据返回值过长 character string buffer too small
- the attribute buffer size is too small 解决方法
- CFileDialog打开多个文件失败 返回错误 FNERR_BUFFERTOOSMALL
- DEVICE DRAW VERTEX BUFFER TOO SMALL
- ORA-06502: PL/SQL: numeric or value error: character string buffer too small