<html>
    <head>
      <base href="https://bugs.freedesktop.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - fc-lang doesn't gracefully handle the case where the last language initial is < 'z'"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=101348">101348</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>fc-lang doesn't gracefully handle the case where  the last language initial is < 'z'
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>fontconfig
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>2.12
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>minor
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>medium
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>library
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>fontconfig-bugs@lists.freedesktop.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>f.rougon@free.fr
          </td>
        </tr>

        <tr>
          <th>QA Contact</th>
          <td>freedesktop@behdad.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=131801" name="attach_131801" title="Fix as Git commit (obtained with 'git format-patch)">attachment 131801</a> <a href="attachment.cgi?id=131801&action=edit" title="Fix as Git commit (obtained with 'git format-patch)">[details]</a></span> <a href='page.cgi?id=splinter.html&bug=101348&attachment=131801'>[review]</a>
Fix as Git commit (obtained with 'git format-patch)

As reported at
<a href="https://lists.freedesktop.org/archives/fontconfig/2017-June/005940.html">https://lists.freedesktop.org/archives/fontconfig/2017-June/005940.html</a> :

FcLangSetIndex() contains code like this:

  low = fcLangCharSetRanges[firstChar - 'a'].begin;
  high = fcLangCharSetRanges[firstChar - 'a'].end;
  /* no matches */
  if (low > high)

The assumption behind this test didn't hold before the attached
commit/patch, unless there is at least one language name that starts
with 'z' (which is thankfully the case in our world :-). If the last
language name in lexicographic order starts for instance with 'x',
this change ensures that fcLangCharSetRanges['y' - 'a'].begin and
fcLangCharSetRanges['z' - 'a'].begin are equal to NUM_LANG_CHAR_SET,
in order to make the above assumption correct in all cases.</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>