[Rpm-maint] [rpm-software-management/rpm] Fix segfault regression on empty script or description at end of spec (#816)

Panu Matilainen notifications at github.com
Wed Aug 14 13:23:22 UTC 2019


More ripples from the parseLines() unification, the callers used to
explicitly allocate an empty string buffer, but with lazy allocation
from parseLines() they're getting NULL in the special circumstance of
being last in the spec, and no "body". Specifically this happens with
empty %description or scriptlet without a body, eg
"%post -p /sbin/ldconfig".

The script regression report + reproducer and a preliminary patch
originally from RhBug:1732276 by nvwarr.
You can view, comment on, or merge this pull request online at:

  https://github.com/rpm-software-management/rpm/pull/816

-- Commit Summary --

  * Fix segfault regression on empty script or description at end of spec

-- File Changes --

    M build/parseDescription.c (9)
    M build/parseScript.c (9)
    M tests/Makefile.am (1)
    M tests/rpmbuild.at (13)

-- Patch Links --

https://github.com/rpm-software-management/rpm/pull/816.patch
https://github.com/rpm-software-management/rpm/pull/816.diff

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/816
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20190814/fc751732/attachment.html>


More information about the Rpm-maint mailing list