commit fec0c10ee67692217473dca9ba7b29dc9b1c296d Author: Andrew Price Date: Thu Sep 5 17:35:04 2013 +0100 Fix a label overflow in plot_io The length of the label option wasn't being checked before strcpy()ing it into a char[256]. Use strncpy instead. rhbz#1004820 Signed-off-by: Andrew Price diff --git a/main.c b/main.c index 1444fbc..d23e3b2 100644 --- a/main.c +++ b/main.c @@ -747,7 +747,8 @@ static void plot_io(struct plot *plot, int min_seconds, int max_seconds, u64 min if (!tf->label) label[0] = 0; else { - strcpy(label, tf->label); + strncpy(label, tf->label, 255); + label[255] = 0; if (io_per_process) strcat(label, " "); }