From 21d0ef61b94cba67b5cfa7c73c3ef381bcb5c30c Mon Sep 17 00:00:00 2001
From: clay_shooter <>
Date: Mon, 8 Nov 2010 02:01:16 +0000
Subject: [PATCH] SF2935662 excepInfo not initialized so NULL check says not
null and manipulates uninitialized data.
---
jacob/docs/ReleaseNotes.html | 5 +++++
jacob/jni/Dispatch.cpp | 2 ++
2 files changed, 7 insertions(+)
diff --git a/jacob/docs/ReleaseNotes.html b/jacob/docs/ReleaseNotes.html
index 5b9ef6e..a8a2313 100644
--- a/jacob/docs/ReleaseNotes.html
+++ b/jacob/docs/ReleaseNotes.html
@@ -32,6 +32,11 @@
Tracked Changes
checked on every object creation for users who run in the standard
all classes in ROT mode. (M2)
+
+ 2935662 |
+ Error handling code crashes because of uninitialized data in Dispatch.cpp
+ Check for NULL fails. pfnDeferredFillIn pointer is not initialized, but it's not NULL. |
+
|
|
diff --git a/jacob/jni/Dispatch.cpp b/jacob/jni/Dispatch.cpp
index 04c6a89..a08153b 100644
--- a/jacob/jni/Dispatch.cpp
+++ b/jacob/jni/Dispatch.cpp
@@ -418,6 +418,8 @@ JNIEXPORT jobject JNICALL Java_com_jacob_com_Dispatch_invokev
{
DISPPARAMS dispparams;
EXCEPINFO excepInfo;
+ // Sourceforge Bug Tracker 2935662 uninitialized data can be not NULL with bad results
+ excepInfo.pfnDeferredFillIn = NULL;
IDispatch *pIDispatch = extractDispatch(env, disp);
if (!pIDispatch) return NULL;