From 63432759bad5c1c2a615c608293bbb87a1cf11fc Mon Sep 17 00:00:00 2001 From: Simon Gomizelj Date: Mon, 17 Sep 2012 19:12:57 -0400 Subject: [PATCH] snprintf buffer len is the wrong length --- termite.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/termite.cc b/termite.cc index 241fcd1..0a488cf 100644 --- a/termite.cc +++ b/termite.cc @@ -148,7 +148,7 @@ static void draw_marker(cairo_t *cr, const char *font, long x, long y, int paddi cairo_select_font_face(cr, font, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_BOLD); cairo_set_font_size(cr, 9); - snprintf(buffer, 10, "%u", id); + snprintf(buffer, sizeof(buffer), "%u", id); cairo_text_extents(cr, buffer, &ext); cairo_set_source_rgb(cr, 1, 1, 1);