<p>More ripples from the parseLines() unification, the callers used to<br>
explicitly allocate an empty string buffer, but with lazy allocation<br>
from parseLines() they're getting NULL in the special circumstance of<br>
being last in the spec, and no "body". Specifically this happens with<br>
empty %description or scriptlet without a body, eg<br>
"%post -p /sbin/ldconfig".</p>
<p>The script regression report + reproducer and a preliminary patch<br>
originally from RhBug:1732276 by nvwarr.</p>

<hr>

<h4>You can view, comment on, or merge this pull request online at:</h4>
<p>  <a href='https://github.com/rpm-software-management/rpm/pull/816'>https://github.com/rpm-software-management/rpm/pull/816</a></p>

<h4>Commit Summary</h4>
<ul>
  <li>Fix segfault regression on empty script or description at end of spec</li>
</ul>

<h4>File Changes</h4>
<ul>
  <li>
    <strong>M</strong>
    <a href="https://github.com/rpm-software-management/rpm/pull/816/files#diff-0">build/parseDescription.c</a>
    (9)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/rpm-software-management/rpm/pull/816/files#diff-1">build/parseScript.c</a>
    (9)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/rpm-software-management/rpm/pull/816/files#diff-2">tests/Makefile.am</a>
    (1)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/rpm-software-management/rpm/pull/816/files#diff-3">tests/rpmbuild.at</a>
    (13)
  </li>
</ul>

<h4>Patch Links:</h4>
<ul>
  <li><a href='https://github.com/rpm-software-management/rpm/pull/816.patch'>https://github.com/rpm-software-management/rpm/pull/816.patch</a></li>
  <li><a href='https://github.com/rpm-software-management/rpm/pull/816.diff'>https://github.com/rpm-software-management/rpm/pull/816.diff</a></li>
</ul>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/rpm-software-management/rpm/pull/816?email_source=notifications&email_token=ADLPZU3HTYGLZIGFGGNZF7TQEQBMVA5CNFSM4ILU2U2KYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HFGRN3Q">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ADLPZU5YUV6OW6X5EPVEY53QEQBMVANCNFSM4ILU2U2A">mute the thread</a>.<img src="https://github.com/notifications/beacon/ADLPZU75WCA2XTOSLU3DYRTQEQBMVA5CNFSM4ILU2U2KYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HFGRN3Q.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/rpm-software-management/rpm/pull/816?email_source=notifications\u0026email_token=ADLPZU3HTYGLZIGFGGNZF7TQEQBMVA5CNFSM4ILU2U2KYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HFGRN3Q",
"url": "https://github.com/rpm-software-management/rpm/pull/816?email_source=notifications\u0026email_token=ADLPZU3HTYGLZIGFGGNZF7TQEQBMVA5CNFSM4ILU2U2KYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HFGRN3Q",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>