changeset 9449:502105e32ac2

Fix mistake in applying patch from Alex Beregszaszi. There's no security problem here, but better safe then sorry.
author eyck
date Mon, 17 Feb 2003 06:46:31 +0000
parents 5b130e0682a8
children 915590b8193b
files drivers/mga_vid.c
diffstat 1 files changed, 8 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/drivers/mga_vid.c	Sun Feb 16 15:26:30 2003 +0000
+++ b/drivers/mga_vid.c	Mon Feb 17 06:46:31 2003 +0000
@@ -1416,14 +1416,14 @@
 {
     unsigned len;
     len = 0;
-    len += sprintf(&mga_param_buff[len]-len,"Interface version: %04X\n",MGA_VID_VERSION);
-    len += sprintf(&mga_param_buff[len]-len,"Memory: %x:%dM\n",mga_mem_base,(unsigned int) mga_ram_size);
-    len += sprintf(&mga_param_buff[len]-len,"MMIO: %p\n",mga_mmio_base);
-    len += sprintf(&mga_param_buff[len]-len ,"Configurable stuff:\n");
-    len += sprintf(&mga_param_buff[len]-len,"~~~~~~~~~~~~~~~~~~~\n");
-    len += sprintf(&mga_param_buff[len]-len,PARAM_BRIGHTNESS"%d\n",mga_brightness);
-    len += sprintf(&mga_param_buff[len]-len,PARAM_CONTRAST"%d\n",mga_contrast);
-    len += sprintf(&mga_param_buff[len]-len,PARAM_BLACKIE"%s\n",regs.blackie?"on":"off");
+    len += snprintf(&mga_param_buff[len],PARAM_BUFF_SIZE-len,"Interface version: %04X\n",MGA_VID_VERSION);                                                                                                       
+    len += snprintf(&mga_param_buff[len],PARAM_BUFF_SIZE-len,"Memory: %x:%dM\n",mga_mem_base,(unsigned int) mga_ram_size);                                                                                       
+    len += snprintf(&mga_param_buff[len],PARAM_BUFF_SIZE-len,"MMIO: %p\n",mga_mmio_base);                                                                                                                        
+    len += snprintf(&mga_param_buff[len],PARAM_BUFF_SIZE-len,"Configurable stuff:\n");                                                                                                                           
+    len += snprintf(&mga_param_buff[len],PARAM_BUFF_SIZE-len,"~~~~~~~~~~~~~~~~~~~\n");                                                                                                                           
+    len += snprintf(&mga_param_buff[len],PARAM_BUFF_SIZE-len,PARAM_BRIGHTNESS"%d\n",mga_brightness);                                                                                                             
+    len += snprintf(&mga_param_buff[len],PARAM_BUFF_SIZE-len,PARAM_CONTRAST"%d\n",mga_contrast);                                                                                                                 
+    len += snprintf(&mga_param_buff[len],PARAM_BUFF_SIZE-len,PARAM_BLACKIE"%s\n",regs.blackie?"on":"off");   
     mga_param_buff_len = len;
     // check boundaries of mga_param_buff before writing to it!!!
 }