Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 471706 Details for
Bug 617572
app-admin/eselect-1.4.9: set 0 makes set <last item> with kernel and profile
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Add-boundary-check.patch
0001-Add-boundary-check.patch (text/plain), 1.43 KB, created by
otakuto.gentoo
on 2017-05-05 10:46:24 UTC
(
hide
)
Description:
Add-boundary-check.patch
Filename:
MIME Type:
Creator:
otakuto.gentoo
Created:
2017-05-05 10:46:24 UTC
Size:
1.43 KB
patch
obsolete
>From ec88b81c3d849c433a4d8a2443304a4f8f8682db Mon Sep 17 00:00:00 2001 >From: Takuto Yoshida <otakuto.gentoo@gmail.com> >Date: Fri, 5 May 2017 19:17:42 +0900 >Subject: [PATCH] Add boundary check > >--- > modules/kernel.eselect | 2 +- > modules/profile.eselect | 8 +++++--- > 2 files changed, 6 insertions(+), 4 deletions(-) > >diff --git a/modules/kernel.eselect b/modules/kernel.eselect >index 3104a98..d4cf2f2 100644 >--- a/modules/kernel.eselect >+++ b/modules/kernel.eselect >@@ -42,7 +42,7 @@ remove_symlink() { > set_symlink() { > local target=$1 > >- if is_number "${target}"; then >+ if is_number "${target}" && [[ ${target} -ge 1 ]]; then > local targets=( $(find_targets) ) > target=${targets[target-1]} > fi >diff --git a/modules/profile.eselect b/modules/profile.eselect >index 68d9b8a..503a062 100644 >--- a/modules/profile.eselect >+++ b/modules/profile.eselect >@@ -80,9 +80,11 @@ set_symlink() { > targets=( $(find_targets) ) > [[ ${#targets[@]} -eq 0 ]] \ > && die -q "Failed to get a list of valid profiles" >- target=${targets[target-1]} >- repo=${target%%::*}; target=${target#*::} >- repopath=${target%%::*}; target=${target#*::} >+ if [[ ${target} -ge 1 ]] ; then >+ target=${targets[target-1]} >+ repo=${target%%::*}; target=${target#*::} >+ repopath=${target%%::*}; target=${target#*::} >+ fi > elif [[ -n ${target} ]]; then > # if the profile was explicitly specified (rather than a number) > # double check and make sure it's valid >-- >2.10.2 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 617572
: 471706