aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/cdrom
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/cdrom')
-rw-r--r--drivers/cdrom/optcd.c2
-rw-r--r--drivers/cdrom/sbpcd.c5
2 files changed, 3 insertions, 4 deletions
diff --git a/drivers/cdrom/optcd.c b/drivers/cdrom/optcd.c
index 25032d7edc55..3541690a77d4 100644
--- a/drivers/cdrom/optcd.c
+++ b/drivers/cdrom/optcd.c
@@ -101,7 +101,7 @@ static void debug(int debug_this, const char* fmt, ...)
101 return; 101 return;
102 102
103 va_start(args, fmt); 103 va_start(args, fmt);
104 vsprintf(s, fmt, args); 104 vsnprintf(s, sizeof(s), fmt, args);
105 printk(KERN_DEBUG "optcd: %s\n", s); 105 printk(KERN_DEBUG "optcd: %s\n", s);
106 va_end(args); 106 va_end(args);
107} 107}
diff --git a/drivers/cdrom/sbpcd.c b/drivers/cdrom/sbpcd.c
index ba50e5a712f2..a1283b1ef989 100644
--- a/drivers/cdrom/sbpcd.c
+++ b/drivers/cdrom/sbpcd.c
@@ -770,11 +770,10 @@ static void msg(int level, const char *fmt, ...)
770 770
771 msgnum++; 771 msgnum++;
772 if (msgnum>99) msgnum=0; 772 if (msgnum>99) msgnum=0;
773 sprintf(buf, MSG_LEVEL "%s-%d [%02d]: ", major_name, current_drive - D_S, msgnum);
774 va_start(args, fmt); 773 va_start(args, fmt);
775 vsprintf(&buf[18], fmt, args); 774 vsnprintf(buf, sizeof(buf), fmt, args);
776 va_end(args); 775 va_end(args);
777 printk(buf); 776 printk(MSG_LEVEL "%s-%d [%02d]: %s", major_name, current_drive - D_S, msgnum, buf);
778#if KLOGD_PAUSE 777#if KLOGD_PAUSE
779 sbp_sleep(KLOGD_PAUSE); /* else messages get lost */ 778 sbp_sleep(KLOGD_PAUSE); /* else messages get lost */
780#endif /* KLOGD_PAUSE */ 779#endif /* KLOGD_PAUSE */