Module: wine
Branch: master
Commit: 3f9c9eaa549e342870af2ee9454a93d29090c1b9
URL: http://source.winehq.org/git/wine.git/?a=commit;h=3f9c9eaa549e342870af2ee94…
Author: Thomas Faber <thomas.faber(a)reactos.org>
Date: Thu May 1 08:57:09 2014 +0200
usp10: Do not write to last script item if buffer space is insufficient.
---
dlls/usp10/usp10.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/usp10/usp10.c b/dlls/usp10/usp10.c
index 94785b2..ae164d2 100644
--- a/dlls/usp10/usp10.c
+++ b/dlls/usp10/usp10.c
@@ -1616,12 +1616,12 @@ static HRESULT _ItemizeInternal(const WCHAR *pwcInChars, int cInChars,
* item is set up to prevent random behaviour if the caller erroneously
* checks the n+1 structure */
index++;
+ if (index + 1 > cMaxItems) return E_OUTOFMEMORY;
memset(&pItems[index].a, 0, sizeof(SCRIPT_ANALYSIS));
TRACE("index=%d cnt=%d iCharPos=%d\n", index, cnt, pItems[index].iCharPos);
/* Set one SCRIPT_STATE item being returned */
- if (index + 1 > cMaxItems) return E_OUTOFMEMORY;
if (pcItems) *pcItems = index;
/* Set SCRIPT_ITEM */
Module: tools
Branch: master
Commit: 9fee4992ceafb7c547b9bd7d7bc3c30d2e9ff4e6
URL: http://source.winehq.org/git/tools.git/?a=commit;h=9fee4992ceafb7c547b9bd7d…
Author: Francois Gouget <fgouget(a)codeweavers.com>
Date: Thu May 1 14:36:25 2014 +0200
testbot/lib: Fix the call to ValuesDiffer() in Item::AUTOLOAD.
ValuesDiffer() is a method, not a function!
---
testbot/lib/ObjectModel/Item.pm | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/testbot/lib/ObjectModel/Item.pm b/testbot/lib/ObjectModel/Item.pm
index 48864f4..f988a46 100644
--- a/testbot/lib/ObjectModel/Item.pm
+++ b/testbot/lib/ObjectModel/Item.pm
@@ -1,5 +1,5 @@
# Copyright 2009 Ge van Geldorp
-# Copyright 2012 Francois Gouget
+# Copyright 2012, 2014 Francois Gouget
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
@@ -218,8 +218,8 @@ sub AUTOLOAD
if (@_)
{
$self->{Itemrefs}{$PropertyName} = shift;
- if (ValuesDiffer($self->{ColValues}{@{$ColNames}[0]},
- $self->{Itemrefs}{$PropertyName}->GetKey()))
+ if ($self->ValuesDiffer($self->{ColValues}{@{$ColNames}[0]},
+ $self->{Itemrefs}{$PropertyName}->GetKey()))
{
$self->{IsModified} = 1;
$self->{ColValues}{@{$ColNames}[0]} = $self->{Itemrefs}{$PropertyName}->GetKey();