Re: Possible regression with Add hysteresis-based noise reduction in synaptics driver

2011-11-25 Thread Peter Clifton
On Thu, 2011-11-24 at 23:14 +0100, Simon Thum wrote:
 I think it's better to go with a lower default, and if people have a
 need they can reduce to zero if they like. I have attached a patch which
 provides some more rationale.

Thanks.. I'll give this a test when I get a moment. (Please remind me if
I've not got to it in a couple of days though, as I've been crazy busy
with work lately).

Best wishes,

Peter Clifton



signature.asc
Description: This is a digitally signed message part
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Re: [PATCH] Limit the number of screens Xvfb will attempt to allocate memory for

2011-11-25 Thread Jamey Sharp
Sure, that makes sense.

Reviewed-by: Jamey Sharp ja...@minilop.net

On 11/23/11, Alan Coopersmith alan.coopersm...@oracle.com wrote:
 Commit f9e3a2955d2ca7 removing the MAXSCREEN limit left the screen
 number too unlimited, and allowed any positive int for a screen number:

 Xvfb :1 -screen 2147483647 1024x1024x8

 Fatal server error:
 Not enough memory for screen 2147483647

 Found by Parfait 0.3.7:
 Error: Integer overflow (CWE 190)
Integer parameter of memory allocation function realloc() may overflow
 due to multiplication with constant value 1112
 at line 293 of hw/vfb/InitOutput.c in function 'ddxProcessArgument'.

 Since the X11 connection setup only has a CARD8 for number of SCREENS,
 limit to 255 screens, which is also low enough to avoid overflow on the
 sizeof(*vfbScreens) * (screenNum + 1) calculation for realloc.

 Signed-off-by: Alan Coopersmith alan.coopersm...@oracle.com
 ---
  hw/vfb/InitOutput.c |4 +++-
  1 files changed, 3 insertions(+), 1 deletions(-)

 diff --git a/hw/vfb/InitOutput.c b/hw/vfb/InitOutput.c
 index 3e5d051..9a9905d 100644
 --- a/hw/vfb/InitOutput.c
 +++ b/hw/vfb/InitOutput.c
 @@ -280,7 +280,9 @@ ddxProcessArgument(int argc, char *argv[], int i)
   int screenNum;
   CHECK_FOR_REQUIRED_ARGUMENTS(2);
   screenNum = atoi(argv[i+1]);
 - if (screenNum  0)
 + /* The protocol only has a CARD8 for number of screens in the
 +connection setup block, so don't allow more than that. */
 + if ((screenNum  0) || (screenNum = 255))
   {
   ErrorF(Invalid screen number %d\n, screenNum);
   UseMsg();
 --
 1.7.3.2

 ___
 xorg-devel@lists.x.org: X.Org development
 Archives: http://lists.x.org/archives/xorg-devel
 Info: http://lists.x.org/mailman/listinfo/xorg-devel

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


Re: [PATCH libXp] fix build: Return 0 instead of NULL in XpGetPdmStartParams() (v2)

2011-11-25 Thread Jeremy Huddleston
Reviewed-by: Jeremy Huddleston jerem...@apple.com

On Nov 24, 2011, at 3:47 PM, Tobias Droste wrote:

 Status is defined as int - NULL is not a valid return value
 
 v2: Remove unneeded cast to Status
 
 Signed-off-by: Tobias Droste tdro...@gmx.de
 ---
 src/XpNotifyPdm.c |8 
 1 files changed, 4 insertions(+), 4 deletions(-)
 
 diff --git a/src/XpNotifyPdm.c b/src/XpNotifyPdm.c
 index c1ceb8e..c77f9e1 100644
 --- a/src/XpNotifyPdm.c
 +++ b/src/XpNotifyPdm.c
 @@ -231,7 +231,7 @@ XpGetPdmStartParams (
   /*
* Error - cannot determine or establish a selection_display.
*/
 - return( (Status) NULL );
 + return( 0 );
 }
 
 /*
 @@ -268,7 +268,7 @@ XpGetPdmStartParams (
   XCloseDisplay( *selection_display );
   *selection_display = (Display *) NULL;
   }
 - return( (Status) NULL );
 + return( 0 );
 }
 
 status = XmbTextListToTextProperty( *selection_display, list, 6,
 @@ -283,7 +283,7 @@ XpGetPdmStartParams (
   XCloseDisplay( *selection_display );
   *selection_display = (Display *) NULL;
   }
 - return( (Status) NULL );
 + return( 0 );
 }
 
 *type  = text_prop.encoding;
 @@ -293,7 +293,7 @@ XpGetPdmStartParams (
 
 XFree(list[5]);
 
 -return( (Status) 1 );
 +return( 1 );
 }
 
 /**
 -- 
 1.7.3.4
 
 ___
 xorg-devel@lists.x.org: X.Org development
 Archives: http://lists.x.org/archives/xorg-devel
 Info: http://lists.x.org/mailman/listinfo/xorg-devel
 

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


[PATCH] Fix segfault when there's no config dir

2011-11-25 Thread przanoni
From: Paulo Zanoni paulo.r.zan...@intel.com

Signed-off-by: Paulo Zanoni paulo.r.zan...@intel.com
---
 hw/xfree86/parser/scan.c |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

Sorry. I guess this should be pushed soon...

diff --git a/hw/xfree86/parser/scan.c b/hw/xfree86/parser/scan.c
index 9b6c356..31c6499 100644
--- a/hw/xfree86/parser/scan.c
+++ b/hw/xfree86/parser/scan.c
@@ -855,8 +855,8 @@ OpenConfigDir(const char *path, const char *cmdline, const 
char *projroot,
free(dirpath);
dirpath = NULL;
}
-   while (num--)
-   free(list[num]);
+   while (num  0)
+   free(list[--num]);
free(list);
}
 
-- 
1.7.7.1

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


Re: [PATCH] Fix segfault when there's no config dir

2011-11-25 Thread Jeremy Huddleston
Reviewed-by: Jeremy Huddleston jerem...@apple.com

On Nov 25, 2011, at 10:38, przan...@gmail.com wrote:

 From: Paulo Zanoni paulo.r.zan...@intel.com
 
 Signed-off-by: Paulo Zanoni paulo.r.zan...@intel.com
 ---
 hw/xfree86/parser/scan.c |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
 
 Sorry. I guess this should be pushed soon...
 
 diff --git a/hw/xfree86/parser/scan.c b/hw/xfree86/parser/scan.c
 index 9b6c356..31c6499 100644
 --- a/hw/xfree86/parser/scan.c
 +++ b/hw/xfree86/parser/scan.c
 @@ -855,8 +855,8 @@ OpenConfigDir(const char *path, const char *cmdline, 
 const char *projroot,
   free(dirpath);
   dirpath = NULL;
   }
 - while (num--)
 - free(list[num]);
 + while (num  0)
 + free(list[--num]);
   free(list);
   }
 
 -- 
 1.7.7.1
 
 ___
 xorg-devel@lists.x.org: X.Org development
 Archives: http://lists.x.org/archives/xorg-devel
 Info: http://lists.x.org/mailman/listinfo/xorg-devel
 

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


Re: [PATCH] Fix segfault when there's no config dir

2011-11-25 Thread Keith Packard
On Fri, 25 Nov 2011 16:38:06 -0200, przan...@gmail.com wrote:
 From: Paulo Zanoni paulo.r.zan...@intel.com
 
 Signed-off-by: Paulo Zanoni paulo.r.zan...@intel.com
 ---
  hw/xfree86/parser/scan.c |4 ++--
  1 files changed, 2 insertions(+), 2 deletions(-)
 
 Sorry. I guess this should be pushed soon...

I'd rather see the scandir return value checked for an error, otherwise
the code depends on the current implementation of AddConfigDirFiles
which seems rather fragile.

-- 
keith.pack...@intel.com


pgpSKvQrvCnTH.pgp
Description: PGP signature
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel