summaryrefslogtreecommitdiff
path: root/dix
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2010-12-07 13:39:58 -0800
committerKeith Packard <keithp@keithp.com>2010-12-07 13:39:58 -0800
commit519d243f0c8e3c80226701f71d2cfa62e42dbff7 (patch)
tree6b383bf1838a86b277a13fb337fbf55247ef6c70 /dix
parent9f9c732311ef0cc198e5ec44d02412eb7e8c3f3a (diff)
parent446482efaa3d266266e2a143492a3ec0523622bd (diff)
Merge remote branch 'alanc/master'
Diffstat (limited to 'dix')
-rw-r--r--dix/Xserver-dtrace.h.in2
-rw-r--r--dix/Xserver.d2
-rw-r--r--dix/devices.c17
-rw-r--r--dix/dispatch.c2
-rw-r--r--dix/dixfonts.c4
-rw-r--r--dix/events.c2
-rw-r--r--dix/resource.c2
7 files changed, 19 insertions, 12 deletions
diff --git a/dix/Xserver-dtrace.h.in b/dix/Xserver-dtrace.h.in
index fce28362a..daf3faf1d 100644
--- a/dix/Xserver-dtrace.h.in
+++ b/dix/Xserver-dtrace.h.in
@@ -1,4 +1,4 @@
-/* Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+/* Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
diff --git a/dix/Xserver.d b/dix/Xserver.d
index 4bc0b9a84..2ad337351 100644
--- a/dix/Xserver.d
+++ b/dix/Xserver.d
@@ -1,4 +1,4 @@
-/* Copyright 2005-2006 Sun Microsystems, Inc. All rights reserved.
+/* Copyright (c) 2005-2006, Oracle and/or its affiliates. All rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
diff --git a/dix/devices.c b/dix/devices.c
index 708860ace..6c0dc42a4 100644
--- a/dix/devices.c
+++ b/dix/devices.c
@@ -2524,9 +2524,11 @@ AllocDevicePair (ClientPtr client, char* name,
if (!pointer)
return BadAlloc;
- pointer->name = calloc(strlen(name) + strlen(" pointer") + 1, sizeof(char));
- strcpy(pointer->name, name);
- strcat(pointer->name, " pointer");
+ if (asprintf(&pointer->name, "%s pointer", name) == -1) {
+ pointer->name = NULL;
+ RemoveDevice(pointer, FALSE);
+ return BadAlloc;
+ }
pointer->public.processInputProc = ProcessOtherEvent;
pointer->public.realInputProc = ProcessOtherEvent;
@@ -2547,9 +2549,12 @@ AllocDevicePair (ClientPtr client, char* name,
return BadAlloc;
}
- keyboard->name = calloc(strlen(name) + strlen(" keyboard") + 1, sizeof(char));
- strcpy(keyboard->name, name);
- strcat(keyboard->name, " keyboard");
+ if (asprintf(&keyboard->name, "%s keyboard", name) == -1) {
+ keyboard->name = NULL;
+ RemoveDevice(keyboard, FALSE);
+ RemoveDevice(pointer, FALSE);
+ return BadAlloc;
+ }
keyboard->public.processInputProc = ProcessOtherEvent;
keyboard->public.realInputProc = ProcessOtherEvent;
diff --git a/dix/dispatch.c b/dix/dispatch.c
index b66861f78..7b2132d3a 100644
--- a/dix/dispatch.c
+++ b/dix/dispatch.c
@@ -75,7 +75,7 @@ Equipment Corporation.
******************************************************************/
/* XSERVER_DTRACE additions:
- * Copyright 2005-2006 Sun Microsystems, Inc. All rights reserved.
+ * Copyright (c) 2005-2006, Oracle and/or its affiliates. All rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
diff --git a/dix/dixfonts.c b/dix/dixfonts.c
index ccb462794..bd1ad3075 100644
--- a/dix/dixfonts.c
+++ b/dix/dixfonts.c
@@ -1817,7 +1817,9 @@ SetDefaultFontPath(char *path)
start = end;
}
if (!start) {
- temp_path = Xprintf("%s%sbuilt-ins", path, *path ? "," : "");
+ if (asprintf(&temp_path, "%s%sbuilt-ins", path, *path ? "," : "")
+ == -1)
+ temp_path = NULL;
} else {
temp_path = strdup(path);
}
diff --git a/dix/events.c b/dix/events.c
index e8cf8d417..ac0792360 100644
--- a/dix/events.c
+++ b/dix/events.c
@@ -75,7 +75,7 @@ Equipment Corporation.
******************************************************************/
/*
- * Copyright © 2003-2005 Sun Microsystems, Inc. All rights reserved.
+ * Copyright (c) 2003-2005, Oracle and/or its affiliates. All rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
diff --git a/dix/resource.c b/dix/resource.c
index a0fe719de..6bd240368 100644
--- a/dix/resource.c
+++ b/dix/resource.c
@@ -73,7 +73,7 @@ Equipment Corporation.
******************************************************************/
/* XSERVER_DTRACE additions:
- * Copyright 2005-2006 Sun Microsystems, Inc. All rights reserved.
+ * Copyright (c) 2005-2006, Oracle and/or its affiliates. All rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),