summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--runtime/librsgt.c2
-rw-r--r--runtime/librsgt_read.c2
-rw-r--r--tools/omfile.c4
3 files changed, 5 insertions, 3 deletions
diff --git a/runtime/librsgt.c b/runtime/librsgt.c
index 92b0d412..20c8fd79 100644
--- a/runtime/librsgt.c
+++ b/runtime/librsgt.c
@@ -649,7 +649,7 @@ sigblkFinish(gtfile gf)
root = NULL;
for(j = 0 ; j < gf->nRoots ; ++j) {
if(root == NULL) {
- root = gf->roots_hash[j];
+ root = gf->roots_valid[j] ? gf->roots_hash[j] : NULL;
gf->roots_valid[j] = 0; /* guess this is redundant with init, maybe del */
} else if(gf->roots_valid[j]) {
rootDel = root;
diff --git a/runtime/librsgt_read.c b/runtime/librsgt_read.c
index 11c43775..d756c336 100644
--- a/runtime/librsgt_read.c
+++ b/runtime/librsgt_read.c
@@ -736,7 +736,7 @@ verifySigblkFinish(gtfile gf, GTDataHash **pRoot)
root = NULL;
for(j = 0 ; j < gf->nRoots ; ++j) {
if(root == NULL) {
- root = gf->roots_hash[j];
+ root = gf->roots_valid[j] ? gf->roots_hash[j] : NULL;
gf->roots_valid[j] = 0; /* guess this is redundant with init, maybe del */
} else if(gf->roots_valid[j]) {
rootDel = root;
diff --git a/tools/omfile.c b/tools/omfile.c
index 4740ed1d..faf3c24f 100644
--- a/tools/omfile.c
+++ b/tools/omfile.c
@@ -759,7 +759,9 @@ doWrite(instanceData *pData, uchar *pszBuf, int lenBuf)
DBGPRINTF("write to stream, pData->pStrm %p, lenBuf %d\n", pData->pStrm, lenBuf);
if(pData->pStrm != NULL){
CHKiRet(strm.Write(pData->pStrm, pszBuf, lenBuf));
- CHKiRet(pData->sigprov.OnRecordWrite(pData->sigprovFileData, pszBuf, lenBuf));
+ if(pData->useSigprov) {
+ CHKiRet(pData->sigprov.OnRecordWrite(pData->sigprovFileData, pszBuf, lenBuf));
+ }
}
finalize_it: