Update of /cvsroot/alsa/alsa-kernel/core
In directory sc8-pr-cvs1:/tmp/cvs-serv4822

Modified Files:
        misc.c 
Log Message:
petter wahlman <[EMAIL PROTECTED]>
vsnprintf does not copy more than 'size' bytes _including_ '\0'


Index: misc.c
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/core/misc.c,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- misc.c      25 Feb 2003 13:01:15 -0000      1.17
+++ misc.c      29 Dec 2003 15:06:13 -0000      1.18
@@ -51,9 +51,8 @@
                printk("ALSA %s:%d: ", file, line);
        }
        va_start(args, format);
-       vsnprintf(tmpbuf, sizeof(tmpbuf)-1, format, args);
+       vsnprintf(tmpbuf, sizeof(tmpbuf), format, args);
        va_end(args);
-       tmpbuf[sizeof(tmpbuf)-1] = '\0';
        printk(tmpbuf);
 }
 #endif
@@ -73,9 +72,8 @@
                printk(KERN_DEBUG "ALSA %s:%d: ", file, line);
        }
        va_start(args, format);
-       vsnprintf(tmpbuf, sizeof(tmpbuf)-1, format, args);
+       vsnprintf(tmpbuf, sizeof(tmpbuf), format, args);
        va_end(args);
-       tmpbuf[sizeof(tmpbuf)-1] = '\0';
        printk(tmpbuf);
 
 }



-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
_______________________________________________
Alsa-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-cvslog

Reply via email to