<html>
    <head>
      <base href="https://bugzilla.libav.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 - left shift in libswscale/utils.c"
   href="https://bugzilla.libav.org/show_bug.cgi?id=984">984</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>left shift in libswscale/utils.c
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>Libav
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>11
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>Other
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux
          </td>
        </tr>

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

        <tr>
          <th>Severity</th>
          <td>enhancement
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>---
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>general
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>bugzilla@libav.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>ago@gentoo.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=615" name="attach_615" title="output">attachment 615</a> <a href="attachment.cgi?id=615&action=edit" title="output">[details]</a></span>
output

Found with the undefined behavior sanitizer.
Compiler: clang-3.8.1
Tested on: 11.8
Command to reproduce: avconv -i $FILE -f null -
Testcase:
<a href="https://github.com/asarubbo/poc/blob/master/00040-libav-leftshift-utils_c">https://github.com/asarubbo/poc/blob/master/00040-libav-leftshift-utils_c</a>
Output:
/tmp/portage/media-video/libav-11.8/work/libav-11.8/libswscale/utils.c:340:30:
runtime error: left shift of negative value -1</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are watching all bug changes.</li>
      </ul>
    </body>
</html>