[PATCH] Prevent buffer overflow in sprintf

Samuel Rødal samuel.rodal at nokia.com
Tue Jul 19 08:38:28 PDT 2011


---
 wayland/connection.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/wayland/connection.c b/wayland/connection.c
index af9a90e..83c96c2 100644
--- a/wayland/connection.c
+++ b/wayland/connection.c
@@ -692,7 +692,7 @@ void
 wl_closure_print(struct wl_closure *closure, struct wl_object *target, int send)
 {
 	union wl_value *value;
-	char buffer[4] = "\0";
+	char buffer[5] = "\0";
 	int i;
 	struct timespec tp;
 	unsigned int time;
-- 
1.7.1


--------------090402020901000202050504--


More information about the wayland-devel mailing list