- 博客(3)
- 资源 (1)
- 收藏
- 关注
原创 解决fortify扫描出的Unreleased Resource: Streams漏洞(java语言)
现有代码如下:。。。writer = connection.getOutputStream();。。。其实这个问题很好解决,从漏洞字面含义大概也能看出,是没有关闭IO流导致的,解决方法如下:。。。writer = connection.getOutputStream();。。。if(writer!=null){ writer.close();}。。
2013-03-04 15:12:27 17448
原创 解决fortify扫描出的Code Correctness: Double-Checked Locking问题(java语言)
现有java代码如下:。。。if (fitz == null) { synchronized (this) { if (fitz == null) { fitz = new Fitzer(); } }}return fitz;。。。使用fortify扫描出Code Correctness: Double-Checked Lock
2013-03-04 15:07:16 5692 1
原创 解决fortify扫描出的Path Manipulation问题(java语言)
编写java打码如下:。。。File proFile = new File(path);。。。 使用fortify扫描,会报一个Path Manipulation的漏洞,怎么解决呢?看下面代码:HashMap map = new HashMap(); map.put("a", "a"); map.put("b", "b"); map.put("c", "c
2013-03-04 14:49:44 29770 9
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人