Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-55284

Resource leak in rpmspec --shell mode

    • Icon: Bug Bug
    • Resolution: Not a Bug
    • Icon: Undefined Undefined
    • rhel-10.0
    • rhel-10.0.beta
    • rpm
    • No
    • None
    • rhel-sst-cs-software-management
    • ssg_core_services
    • None
    • False
    • Hide

      None

      Show
      None
    • None
    • None
    • None
    • None
    • None

      Found by OpenScanHab:

      1. rpm-4.19.1.1/tools/rpmspec.c:70:5: alloc_fn: Storage is returned from allocation function "readline".
      2. rpm-4.19.1.1/tools/rpmspec.c:70:5: var_assign: Assigning: "line" = storage returned from "readline("> ")".
      4. rpm-4.19.1.1/tools/rpmspec.c:71:2: noescape: Resource "line" is not freed or pointed-to in "rpmExpand".
      8. rpm-4.19.1.1/tools/rpmspec.c:70:5: overwrite_var: Overwriting "line" in "line = readline("> ")" leaks the storage that "line" points to.
      #    68|       fprintf(stderr, _("RPM version %s macro shell\n"), rpmEVR);
      #    69|       char *line = NULL;
      #    70|->     while ((line = readline("> ")) != NULL) {
      #    71|   	char *exp = rpmExpand(line, NULL);
      #    72|   	if (*exp)
      

              packaging-team-maint packaging-team-maint
              mdomonko@redhat.com Michal Domonkos
              packaging-team-maint packaging-team-maint
              Software Management QE Software Management QE
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: