<dd id="sga4y"><optgroup id="sga4y"></optgroup></dd>
<nav id="sga4y"><code id="sga4y"></code></nav>
  • <optgroup id="sga4y"></optgroup>

    Undefined Behavior

    ABSTRACT

    除非該函數的控制參數設置為一個特定值,否則無法定義的行為。

    EXPLANATION

    The Linux Standard Base Specification 2.0.1 for libc 對一些內部函數的參數進行了限制 [1]。如果函數的參數不滿足這些約束條件,將無法定義函數的行為。


    在下列 file system 函數中,值 1 必須傳遞給第一個參數(版本號):


    __xmknod


    在下列寬字符字符串函數中,數值 2 必須傳遞給第三個參數(組參數):


    __wcstod_internal
    __wcstof_internal
    _wcstol_internal
    __wcstold_internal
    __wcstoul_internal


    在下列 file system 函數中,數值 3 必須作為第一參數(版本號)進行傳遞:


    __xstat
    __lxstat
    __fxstat
    __xstat64
    __lxstat64
    __fxstat64

    REFERENCES

    [1] Standards Mapping - Common Weakness Enumeration - (CWE) CWE ID 475

    [2] The Linux Standard Base Specification 2.0.1, Interfaces Definitions for libc.


    Copyright 2013 Fortify Software - All rights reserved.
    (Generated from version 2013.1.1.0008 of the Fortify Secure Coding Rulepacks)
    desc.semantic.cpp.undefined_behavior

    97av