<pre id="vvttv"><mark id="vvttv"><progress id="vvttv"></progress></mark></pre>
    <pre id="vvttv"></pre>

      <p id="vvttv"></p>

          <p id="vvttv"></p>

                <p id="vvttv"></p>

                <pre id="vvttv"><cite id="vvttv"><progress id="vvttv"></progress></cite></pre>

                  <output id="vvttv"><dfn id="vvttv"><th id="vvttv"></th></dfn></output>

                    <p id="vvttv"></p>

                    Portability Flaw: File Separator

                    ABSTRACT

                    使用硬編碼文件分隔符會導致可移植性問題。

                    EXPLANATION

                    不同的操作系統使用不同的字符作為文件分隔符。例如,Microsoft Windows 系統使用 "\",而 UNIX 系統則使用 "/"。應用程序需要在不同的平臺上運行時,使用硬編碼文件分隔符會導致應用程序邏輯執行錯誤,并有可能導致 denial of service。



                    例 1:以下代碼使用硬編碼文件分隔符來打開文件:


                    ...
                    os.open(directoryName + "\\" + fileName);
                    ...

                    REFERENCES

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


                    Copyright 2013 Fortify Software - All rights reserved.
                    (Generated from version 2013.1.1.0008 of the Fortify Secure Coding Rulepacks)
                    desc.dataflow.python.portability_flaw_file_separator

                      <pre id="vvttv"><mark id="vvttv"><progress id="vvttv"></progress></mark></pre>
                      <pre id="vvttv"></pre>

                        <p id="vvttv"></p>

                            <p id="vvttv"></p>

                                  <p id="vvttv"></p>

                                  <pre id="vvttv"><cite id="vvttv"><progress id="vvttv"></progress></cite></pre>

                                    <output id="vvttv"><dfn id="vvttv"><th id="vvttv"></th></dfn></output>

                                      <p id="vvttv"></p>

                                      这里只有精品视频