<p>Youness Alaoui has uploaded this change for <strong>review</strong>.</p><p><a href="https://review.coreboot.org/21962">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">util/ifdtool: Fix region limitation check<br><br>Using ifdtool to change layout on a 'ifd v2' file causes an error<br>about region type 5 not being valid.<br>The limit to check against is dynamic depending on ifd version, not<br>static.<br><br>Change-Id: Id4cdce4eac18fb0d171d1bdfa2044340bf93056a<br>Signed-off-by: Youness Alaoui <youness.alaoui@puri.sm><br>---<br>M util/ifdtool/ifdtool.c<br>1 file changed, 2 insertions(+), 2 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://review.coreboot.org:29418/coreboot refs/changes/62/21962/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">diff --git a/util/ifdtool/ifdtool.c b/util/ifdtool/ifdtool.c<br>index 645175e..8397f5c 100644<br>--- a/util/ifdtool/ifdtool.c<br>+++ b/util/ifdtool/ifdtool.c<br>@@ -171,7 +171,7 @@<br> <br>         limit_mask = base_mask << 16;<br> <br>-       if (region_type >= MAX_REGIONS) {<br>+ if (region_type >= max_regions) {<br>          fprintf(stderr, "Invalid region type %d.\n", region_type);<br>          exit (EXIT_FAILURE);<br>  }<br>@@ -190,7 +190,7 @@<br> static void set_region(frba_t *frba, unsigned int region_type,<br>                      const region_t *region)<br> {<br>-   if (region_type >= MAX_REGIONS_OLD) {<br>+     if (region_type >= max_regions) {<br>          fprintf(stderr, "Invalid region type %u.\n", region_type);<br>          exit (EXIT_FAILURE);<br>  }<br></pre><p>To view, visit <a href="https://review.coreboot.org/21962">change 21962</a>. To unsubscribe, visit <a href="https://review.coreboot.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://review.coreboot.org/21962"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: coreboot </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: Id4cdce4eac18fb0d171d1bdfa2044340bf93056a </div>
<div style="display:none"> Gerrit-Change-Number: 21962 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Youness Alaoui <snifikino@gmail.com> </div>