components/openscap/patches/seap-packet.c.patch
author zihao.zhu@oracle.com <zihao.zhu@oracle.com>
Wed, 18 May 2016 13:41:53 -0700
changeset 6023 1285c8b9e736
parent 4893 95c28fe27246
permissions -rw-r--r--
23284011 openldap upgrade breaks userland build

This patch fixes some memory management issues with 
SEAP. This patch has not been contributed upstream
but will be done by 2015-09-30.
--- openscap-1.2.3/src/OVAL/probes/SEAP/seap-packet.c.~1~	2015-09-09 08:47:22.067689406 -0700
+++ openscap-1.2.3/src/OVAL/probes/SEAP/seap-packet.c	2015-09-09 08:47:46.696514370 -0700
@@ -730,7 +730,6 @@
                         } else {
                                 SEXP_list_free (sexp_buffer);
                                 SEXP_psetup_free (psetup);
-				SEXP_free(sexp_buffer);
                                 dI("eloop_restart\n");
                                 goto eloop_start;
                         }
--- openscap-1.2.3/src/OVAL/probes/SEAP/sexp-value.c.~1~	2015-09-10 15:14:06.694228778 -0700
+++ openscap-1.2.3/src/OVAL/probes/SEAP/sexp-value.c	2015-09-10 15:15:53.755827733 -0700
@@ -119,7 +119,7 @@
         _A(sz < 16);
 
         if (sm_memalign ((void **)(void *)&lblk, SEXP_LBLK_ALIGN,
-                         sizeof (uintptr_t) + (2 * sizeof (uint16_t)) + (sizeof (SEXP_t) * (1 << sz))) != 0) {
+                         sizeof (struct SEXP_val_lblk) + (sizeof (SEXP_t) * (1 << sz))) != 0) {
                 /* TODO: handle this */
                 abort ();
                 return ((uintptr_t) NULL);