Skip to content

Conversation

Mikachu2333
Copy link
Collaborator

问题描述

  1. patch core.c 修改函数实现 #294

方案与实现

  1. 修复了 ccmywish 提到的格式问题、无用的额外赋值问题等
  2. 在 Windows 上使用 GetTempPathGetTempFileName 创建临时文件(这也是winapi推荐的标准方式)并且这样的话理论上也可以大幅避免注入攻击或者临时文件存在等问题
  3. 增加了一点错误处理,上次没考虑全,漏情况了

1. 改进了获取新创建文件名的方式
2. 改进了内存泄漏问题
Copy link
Contributor

@ccmywish ccmywish left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

好代码 👍

@ccmywish ccmywish merged commit 31c93f0 into RubyMetric:dev Oct 6, 2025
3 of 4 checks passed
@ccmywish ccmywish added this to the v0.2.3 milestone Oct 6, 2025
@ccmywish ccmywish added 改善加强 改善加强 Windows Windows相关 labels Oct 6, 2025
@Mikachu2333 Mikachu2333 deleted the fix/create_tmpfile branch October 6, 2025 08:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Windows Windows相关 改善加强 改善加强
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants