[PR #1420] [MERGED] Add length check for the return string #15898

Closed
opened 2025-11-02 11:57:13 -06:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/go-gitea/gitea/pull/1420
Author: @typeless
Created: 3/31/2017
Status: Merged
Merged: 3/31/2017
Merged by: @appleboy

Base: masterHead: add-sanity-check


📝 Commits (3)

  • 9e81599 Add length check for the return string
  • 49d2f57 Differentiate error paths and logging messages
  • 7ae6fb5 Rectify error message

📊 Changes

1 file changed (+3 additions, -1 deletions)

View changed files

📝 models/pull.go (+3 -1)

📄 Description

Without the check, it could lead to out-of-bound panic if the return string is shorter than expected.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/go-gitea/gitea/pull/1420 **Author:** [@typeless](https://github.com/typeless) **Created:** 3/31/2017 **Status:** ✅ Merged **Merged:** 3/31/2017 **Merged by:** [@appleboy](https://github.com/appleboy) **Base:** `master` ← **Head:** `add-sanity-check` --- ### 📝 Commits (3) - [`9e81599`](https://github.com/go-gitea/gitea/commit/9e81599215c06f7c485137a84f262ed9bd3847f0) Add length check for the return string - [`49d2f57`](https://github.com/go-gitea/gitea/commit/49d2f572b6d488a5a923f2644e3fab5ee787b7ae) Differentiate error paths and logging messages - [`7ae6fb5`](https://github.com/go-gitea/gitea/commit/7ae6fb50ccb134c9f44cbbabf740ac78b3cc9b28) Rectify error message ### 📊 Changes **1 file changed** (+3 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `models/pull.go` (+3 -1) </details> ### 📄 Description Without the check, it could lead to out-of-bound panic if the return string is shorter than expected. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2025-11-02 11:57:13 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#15898