Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

書き込み範囲のチェック漏れ対策(CUtf7) #1869

Merged

Conversation

berryzplus
Copy link
Contributor

PR の目的

SonarCloudで検出されているBlockerレベルのBugs指摘を潰して、コードに対する安心感を向上させます。

カテゴリ

  • その他の問題

PR の背景

SonarCloudでBlockerレベルのBugs警告が2件発生しています。
https://sonarcloud.io/project/issues?resolved=false&severities=BLOCKER&types=BUG&id=sakura-editor_sakura

PR のメリット

  • BlockerレベルのBugs警告が一掃されます。
  • CUtf7クラスに対するテストカバレッジがわずかに向上します。

PR のデメリット (トレードオフとかあれば)

  • とくにありません。

仕様・動作説明

対応する指摘は以下2つです。

内容の説明は不要と思うので必要でしたら言ってください。

PR の影響範囲

文字セットUTF7の読み込み、書き込み、変換に影響する変更です。
(実態として機能変更はありません。)

テスト内容

  • CUTF7クラスの独自仕様 (L"+"を"+-"に変換する) について単体テストを追加し、変更前後で挙動に差がないことを確認しました。
  • ローカルのSonarCloudにてBugsの解消を確認しました。

関連 issue, PR

参考資料

@berryzplus berryzplus marked this pull request as draft November 6, 2022 09:53
@berryzplus berryzplus force-pushed the feature/fix_bufferoverflow_cutf7 branch from b922e70 to ce00e77 Compare November 6, 2022 09:57
@AppVeyorBot
Copy link

@sonarcloud
Copy link

sonarcloud bot commented Nov 6, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

97.1% 97.1% Coverage
0.0% 0.0% Duplication

@AppVeyorBot
Copy link

@berryzplus berryzplus marked this pull request as ready for review November 6, 2022 10:44
Copy link
Member

@kengoide kengoide left a comment

Choose a reason for hiding this comment

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

お久しぶりです。都合により @k-kagari から ID を変更しました。

読み取り範囲のオーバーフロー、誤検知と考えられる
書き込み範囲のオーバーフロー、実害はないが関数仕様として対策必須

品質向上という目標に対していずれも適切な対処だと思います。承認しておきます。

@berryzplus
Copy link
Contributor Author

レビューありがとうございます。マージします。

@berryzplus berryzplus merged commit 333f2c1 into sakura-editor:master Dec 14, 2022
@berryzplus berryzplus deleted the feature/fix_bufferoverflow_cutf7 branch December 14, 2022 05:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants