fbdev: fix snprintf() limit in show_bl_curve()
[deliverable/linux.git] / drivers / video / fbdev / core / fbsysfs.c
index 60c3f0a1634111c41f346b0d2af5d32f1955bd28..15755ce1d26c817587f7f600db41963c46e16c7e 100644 (file)
@@ -485,7 +485,7 @@ static ssize_t show_bl_curve(struct device *device,
 
        mutex_lock(&fb_info->bl_curve_mutex);
        for (i = 0; i < FB_BACKLIGHT_LEVELS; i += 8)
-               len += snprintf(&buf[len], PAGE_SIZE, "%8ph\n",
+               len += scnprintf(&buf[len], PAGE_SIZE - len, "%8ph\n",
                                fb_info->bl_curve + i);
        mutex_unlock(&fb_info->bl_curve_mutex);
 
This page took 0.024983 seconds and 5 git commands to generate.