如何避免Fortify中的“Path Manipulation”错误?

时间:2012-09-28 18:43:35

标签: fortify

  

可能重复:
  How to fix ‘Path Manipulation’ issue from Fortify scan report for tthe following code sample

Fortify在new FileWriter(psPath + psFileName + psExtension, false)

的行上提供了Path Manipulation错误

任何人都可以告诉我如何解决这个问题,以便强化不会出现此错误吗?

public void setWriter(String psPath, String psFileName, String psExtension)
        throws Exception {
    fwFileWriter = new FileWriter(psPath + psFileName + psExtension, false);
    bwFileWriter = new BufferedWriter(fwFileWriter);
}

0 个答案:

没有答案