summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--storage/connect/bsonudf.cpp8
-rw-r--r--storage/connect/filamdbf.cpp2
2 files changed, 5 insertions, 5 deletions
diff --git a/storage/connect/bsonudf.cpp b/storage/connect/bsonudf.cpp
index e93f40eb509..2d9132e20ed 100644
--- a/storage/connect/bsonudf.cpp
+++ b/storage/connect/bsonudf.cpp
@@ -3571,14 +3571,14 @@ char *bson_item_merge(UDF_INIT *initid, UDF_ARGS *args, char *result,
if (!CheckMemory(g, initid, args, 2, false, false, true)) {
JTYP type;
BJNX bnx(g);
- PBVAL jvp, top = NULL;
+ PBVAL jvp = NULL, top = NULL;
PBVAL jsp[2] = {NULL, NULL};
for (int i = 0; i < 2; i++) {
jvp = bnx.MakeValue(args, i, true);
if (i) {
- if (jvp->Type != type) {
+ if (jvp && (jvp->Type != type)) {
PUSH_WARNING("Argument types mismatch");
goto fin;
} // endif type
@@ -5722,14 +5722,14 @@ char *bbin_item_merge(UDF_INIT *initid, UDF_ARGS *args, char *result,
if (!CheckMemory(g, initid, args, 2, false, false, true)) {
JTYP type;
BJNX bnx(g);
- PBVAL jvp, top = NULL;
+ PBVAL jvp = NULL, top = NULL;
PBVAL jsp[2] = {NULL, NULL};
for (int i = 0; i < 2; i++) {
if (i) {
jvp = bnx.MakeValue(args, i, true);
- if (jvp->Type != type) {
+ if (jvp && (jvp->Type != type)) {
PUSH_WARNING("Argument types mismatch");
goto fin;
} // endif type
diff --git a/storage/connect/filamdbf.cpp b/storage/connect/filamdbf.cpp
index 4c3ec10062b..a4c2232b1bf 100644
--- a/storage/connect/filamdbf.cpp
+++ b/storage/connect/filamdbf.cpp
@@ -244,7 +244,7 @@ PQRYRES DBFColumns(PGLOBAL g, PCSZ dp, PCSZ fn, PTOS topt, bool info)
int rc, type, len, field, fields;
bool bad, mul;
PCSZ target, pwd;
- DBFHEADER mainhead, *hp;
+ DBFHEADER mainhead, *hp = NULL;
DESCRIPTOR thisfield, *tfp;
FILE *infile = NULL;
UNZIPUTL *zutp = NULL;