Patchwork [bitbake-devel,4/4] bitbake: imagedetailspage: Fix crash with more than 15 layers

login
register
mail settings
Submitter Robert Yang
Date Dec. 25, 2013, 2:19 a.m.
Message ID <02469d66b7b241105ad15e5732bea68417178bb3.1387937195.git.liezhi.yang@windriver.com>
Download mbox | patch
Permalink /patch/63723/
State New
Headers show

Comments

Robert Yang - Dec. 25, 2013, 2:19 a.m.
From: Richard Purdie <richard.purdie@linuxfoundation.org>

If you had more than 15 layers the system would crash since one more
value is added to one array than the other. This fixes the code
so equal numbers of values are added to the arrays and hence
doesn't crash when many layers are enabled.

(Bitbake master rev: 4e65463886a2ef245b2f8974e82e9cb942af224b)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
---
 bitbake/lib/bb/ui/crumbs/imagedetailspage.py |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch

diff --git a/bitbake/lib/bb/ui/crumbs/imagedetailspage.py b/bitbake/lib/bb/ui/crumbs/imagedetailspage.py
index b5d9660..ac82e27 100755
--- a/bitbake/lib/bb/ui/crumbs/imagedetailspage.py
+++ b/bitbake/lib/bb/ui/crumbs/imagedetailspage.py
@@ -355,9 +355,9 @@  class ImageDetailsPage (HobPage):
             vallist.append(base_image)
             i = 0
             for layer in layers:
-                varlist.append(" - ")
                 if i > layer_num_limit:
                     break
+                varlist.append(" - ")
                 i += 1
             vallist.append("")
             i = 0