ISO IEC TS 17961 CORR 1-2016 Information technology - Programming languages their environments and system software interfaces - C secure coding rules Technical .pdf

上传人:ideacase155 文档编号:1257456 上传时间:2019-09-02 格式:PDF 页数:3 大小:511KB
下载 相关 举报
ISO IEC TS 17961 CORR 1-2016 Information technology - Programming languages their environments and system software interfaces - C secure coding rules Technical .pdf_第1页
第1页 / 共3页
ISO IEC TS 17961 CORR 1-2016 Information technology - Programming languages their environments and system software interfaces - C secure coding rules Technical .pdf_第2页
第2页 / 共3页
ISO IEC TS 17961 CORR 1-2016 Information technology - Programming languages their environments and system software interfaces - C secure coding rules Technical .pdf_第3页
第3页 / 共3页
亲,该文档总共3页,全部预览完了,如果喜欢就下载吧!
资源描述

1、 TECHNICAL SPECIFICATION ISO/IEC TS 17961:2013 TECHNICAL CORRIGENDUM 1 Published 2016-08-15 INTERNATIONAL ORGANIZATION FOR STANDARDIZATION ORGANISATION INTERNATIONALE DE NORMALISATION INTERNATIONAL ELECTROTECHNICAL COMMISSION COMMISSION LECTROTECHNIQUE INTERNATIONALEInformation technology Programmin

2、g languages, their environments and system software interfaces C secure coding rules TECHNICAL CORRIGENDUM 1 Technologies de linformation Langages de programmation, leur environnement et interfaces des logiciels de systmes Rgles de programmation scurise en C RECTIFICATIF TECHNIQUE 1 Technical Corrig

3、endum 1 to ISO/IEC TS 17961:2013 was prepared by Joint Technical Committee ISO/IEC JTC 1, Information technology, Subcommittee SC 22, Programming languages, their environments and system software interfaces. ICS 35.060 Ref. No. ISO/IEC TS 17961:2013/Cor.1:2016(E) ISO/IEC 2016 All rights reserved Pub

4、lished in Switzerland ISO/IEC TS 17961:2013/Cor.1:2016(E) 2 ISO/IEC 2016 All rights reserved In rule 5.21, Rule section, replace with A call to a standard memory allocation function taking a size integer argument n and presumed to be intended for type T * shall be diagnosed when n sizeof(T) . A call

5、 to a standard memory allocation function taking a size integer argument n and presumed to be intended for type T * shall be regarded as an array of N elements, where N = n / sizeof(T) . Any allocation where N = 0 shall be diagnosed (i.e. where n sizeof(T). Also, any attempt to use this array in a m

6、anner that causes its array bound to be violated shall be diagnosed. In rule 5.21, replace EXAMPLE In this noncompliant example, a diagnostic is required because the value of n that is used in the malloc() call has been possibly miscalculated. wchar_t *f1(void) const wchar_t *p = L“Hello, World!“; c

7、onst size_t n = sizeof(p) * (wcslen(p) + 1); wchar_t *q = (wchar_t *)malloc(n); / diagnostic required /* . */ return q; with EXAMPLE 1 struct S1 unsigned int x; float y; struct S1 *z; ; struct S1 *f1(void) struct S1 *p = (struct S1*)malloc(sizeof(p); / diagnostic required return p; ISO/IEC TS 17961:2013/Cor.1:2016(E) ISO/IEC 2016 All rights reserved 3 EXAMPLE 2 wchar_t *f2(void) const wchar_t *p = L“Hello, World!“; const size_t n = (wcslen(p) + 1); wchar_t *q = (wchar_t *)malloc(n); wcscpy(q, p); / diagnostic required return q;

展开阅读全文
相关资源
猜你喜欢
  • BS EN 14070-2003+A1-2009 Safety of machine tools Transfer and special purpose machines《机床安全 传送装置和专用机械》.pdf BS EN 14070-2003+A1-2009 Safety of machine tools Transfer and special purpose machines《机床安全 传送装置和专用机械》.pdf
  • BS EN 14071-2015 LPG equipment and accessories Pressure relief valves for LPG pressure vessels Ancillary equipment《液化石油气设备和附件 液化石油气压力容器的泄压阀 辅助设备》.pdf BS EN 14071-2015 LPG equipment and accessories Pressure relief valves for LPG pressure vessels Ancillary equipment《液化石油气设备和附件 液化石油气压力容器的泄压阀 辅助设备》.pdf
  • BS EN 14072-2003 Glass in furniture - Test methods《家具中的玻璃 试验方法》.pdf BS EN 14072-2003 Glass in furniture - Test methods《家具中的玻璃 试验方法》.pdf
  • BS EN 14073-2-2004 Office furniture - Storage furniture - Safety requirements《办公家具 储存用家具 安全要求》.pdf BS EN 14073-2-2004 Office furniture - Storage furniture - Safety requirements《办公家具 储存用家具 安全要求》.pdf
  • BS EN 14073-3-2004 Office furniture - Storage furniture - Test methods for the determination of stability and strength of the structure《办公家具 储存用家具 结构的稳定性和强度的测定用试验方法》.pdf BS EN 14073-3-2004 Office furniture - Storage furniture - Test methods for the determination of stability and strength of the structure《办公家具 储存用家具 结构的稳定性和强度的测定用试验方法》.pdf
  • BS EN 14074-2004 Office furniture - Tables and desks and storage furniture - Test methods for the determination of strength and durability of moving parts《办公家具 桌子和储存用家具 可动部件的强度和耐用性.pdf BS EN 14074-2004 Office furniture - Tables and desks and storage furniture - Test methods for the determination of strength and durability of moving parts《办公家具 桌子和储存用家具 可动部件的强度和耐用性.pdf
  • BS EN 14076-2013 Timber stairs Terminology《木楼梯 术语》.pdf BS EN 14076-2013 Timber stairs Terminology《木楼梯 术语》.pdf
  • BS EN 14077-2003 Petroleum products - Determination of organic halogen content - Oxidative microcoulometric method《石油制品 有机卤素含量的测定 氧化微库仑法》.pdf BS EN 14077-2003 Petroleum products - Determination of organic halogen content - Oxidative microcoulometric method《石油制品 有机卤素含量的测定 氧化微库仑法》.pdf
  • BS EN 14078-2014 Liquid petroleum products Determination of fatty acid methyl ester (FAME) content in middle distillates Infrared spectrometry method《液化石油制品 中间馏出物中脂肪酸甲酯含量的测定 红外光谱测定.pdf BS EN 14078-2014 Liquid petroleum products Determination of fatty acid methyl ester (FAME) content in middle distillates Infrared spectrometry method《液化石油制品 中间馏出物中脂肪酸甲酯含量的测定 红外光谱测定.pdf
  • 相关搜索

    当前位置:首页 > 标准规范 > 国际标准 > 其他

    copyright@ 2008-2019 麦多课文库(www.mydoc123.com)网站版权所有
    备案/许可证编号:苏ICP备17064731号-1