gosec: G601 - Implicit memory aliasing in for loop
G601 warning doen't mean there's a vulnerabilty. But this code could have unintended bugs. Disabling warnings locally.
This commit is contained in:
parent
8136209d17
commit
610db6563a
7 changed files with 24 additions and 0 deletions
|
|
@ -193,6 +193,8 @@ func APIErrorList(page int, pageSize int, c echo.Context) *ErrorList {
|
|||
|
||||
errs := getServiceErrors()[min(page*pageSize, len(getServiceErrors())):min(((page+1)*pageSize), len(getServiceErrors()))]
|
||||
for _, e := range errs {
|
||||
// Implicit memory alasing doesn't couse any bug in this case
|
||||
/* #nosec G601 */
|
||||
list.Items = append(list.Items, *APIError(e.code, &e, c))
|
||||
}
|
||||
list.Size = len(list.Items)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue