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

fix: crash when characters over 2^30 #313

Merged
merged 1 commit into from
Dec 26, 2024
Merged

Conversation

rb-union
Copy link
Contributor

In Qt5, just under 2^30 chcaacters in one QString. So we need catch bad_calloc and abort allocate.

Log: Fix one crash issue.
Bug: https://pms.uniontech.com/bug-view-297727.html

In Qt5, just under 2^30 chcaacters in one QString.
So we need catch bad_calloc and abort allocate.

Log: Fix one crash issue.
Bug: https://pms.uniontech.com/bug-view-297727.html
@deepin-ci-robot
Copy link

deepin pr auto review

关键摘要:

  • 在插入文本时捕获异常,但没有处理异常后的逻辑,可能会导致资源泄露或程序状态不一致。
  • 异常处理应该更具体,而不是捕获所有类型的异常,以避免掩盖其他潜在的错误。
  • 注释中提到Qt5和Qt6的字符串长度限制,但没有具体说明如何处理超过限制的情况。

是否建议立即修改:

@deepin-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: pengfeixx, rb-union

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@rb-union rb-union merged commit bd742e7 into linuxdeepin:master Dec 26, 2024
20 checks passed
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