This->travellog.position is 0 based while This->travellog.length is a total counter. So, with current comparison if(This->travellog.position >= This->travellog.length) go_forward() would jump to an invalid index if position == 1 and length == 2.
This patch fixes a crash while navigating html help file that I have here.
Signed-off-by: Dmitry Timoshkov dmitry@baikal.ru --- dlls/ieframe/navigate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/ieframe/navigate.c b/dlls/ieframe/navigate.c index 9efdacc080e..82d1399334f 100644 --- a/dlls/ieframe/navigate.c +++ b/dlls/ieframe/navigate.c @@ -1127,7 +1127,7 @@ HRESULT go_back(DocHost *This)
HRESULT go_forward(DocHost *This) { - if(This->travellog.position >= This->travellog.length) { + if(This->travellog.position+1 >= This->travellog.length) { WARN("No history available\n"); return E_FAIL; }
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=105574
Your paranoid android.
=== debian11 (32 bit report) ===
ieframe: webbrowser.c:3341: Test failed: GoForward failed: 80004005 webbrowser.c:3342: Test failed: expected Invoke_BEFORENAVIGATE2 webbrowser.c:3345: Test failed: expected Invoke_COMMANDSTATECHANGE_NAVIGATEBACK_TRUE webbrowser.c:3352: Test failed: expected Invoke_COMMANDSTATECHANGE_NAVIGATEFORWARD_FALSE webbrowser: Timeout
=== debian11 (32 bit Chinese:China report) ===
ieframe: webbrowser.c:3341: Test failed: GoForward failed: 80004005 webbrowser.c:3342: Test failed: expected Invoke_BEFORENAVIGATE2 webbrowser.c:3345: Test failed: expected Invoke_COMMANDSTATECHANGE_NAVIGATEBACK_TRUE webbrowser.c:3352: Test failed: expected Invoke_COMMANDSTATECHANGE_NAVIGATEFORWARD_FALSE webbrowser: Timeout
=== debian11 (32 bit WoW report) ===
ieframe: webbrowser.c:3341: Test failed: GoForward failed: 80004005 webbrowser.c:3342: Test failed: expected Invoke_BEFORENAVIGATE2 webbrowser.c:3345: Test failed: expected Invoke_COMMANDSTATECHANGE_NAVIGATEBACK_TRUE webbrowser.c:3352: Test failed: expected Invoke_COMMANDSTATECHANGE_NAVIGATEFORWARD_FALSE webbrowser: Timeout
=== debian11 (64 bit WoW report) ===
ieframe: webbrowser.c:3341: Test failed: GoForward failed: 80004005 webbrowser.c:3342: Test failed: expected Invoke_BEFORENAVIGATE2 webbrowser.c:3345: Test failed: expected Invoke_COMMANDSTATECHANGE_NAVIGATEBACK_TRUE webbrowser.c:3352: Test failed: expected Invoke_COMMANDSTATECHANGE_NAVIGATEFORWARD_FALSE webbrowser: Timeout
On 1/21/22 11:55, Marvin wrote:
webbrowser.c:3341: Test failed: GoForward failed: 80004005 webbrowser.c:3342: Test failed: expected Invoke_BEFORENAVIGATE2 webbrowser.c:3345: Test failed: expected Invoke_COMMANDSTATECHANGE_NAVIGATEBACK_TRUE webbrowser.c:3352: Test failed: expected Invoke_COMMANDSTATECHANGE_NAVIGATEFORWARD_FALSE webbrowser: Timeout
FWIW, those failures seem valid and related to the patch.
Jacek
Jacek Caban jacek@codeweavers.com wrote:
On 1/21/22 11:55, Marvin wrote:
webbrowser.c:3341: Test failed: GoForward failed: 80004005 webbrowser.c:3342: Test failed: expected Invoke_BEFORENAVIGATE2 webbrowser.c:3345: Test failed: expected Invoke_COMMANDSTATECHANGE_NAVIGATEBACK_TRUE webbrowser.c:3352: Test failed: expected Invoke_COMMANDSTATECHANGE_NAVIGATEFORWARD_FALSE webbrowser: Timeout
FWIW, those failures seem valid and related to the patch.
Right. The real culprit of the crashes that I observe locally is caused by a reused history entry with invalid entry->stream. I'll send another patch that fixes the crashes.