Skip to content

Commit e292ead

Browse files
committed
Merge tag 'char-misc-6.10-rc1-fix' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc
Pull char/misc fix from Greg KH: "Here is one remaining bugfix for 6.10-rc1 that missed the 6.9-final merge window, and has been sitting in my tree and linux-next for quite a while now, but wasn't sent to you (my fault, travels...) It is a bugfix to resolve an error in the speakup code that could overflow a buffer. It has been in linux-next for a while with no reported problems" * tag 'char-misc-6.10-rc1-fix' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: speakup: Fix sizeof() vs ARRAY_SIZE() bug
2 parents f6d199c + 008ab3c commit e292ead

File tree

1 file changed

+1
-1
lines changed
  • drivers/accessibility/speakup

1 file changed

+1
-1
lines changed

drivers/accessibility/speakup/main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -574,7 +574,7 @@ static u_long get_word(struct vc_data *vc)
574574
}
575575
attr_ch = get_char(vc, (u_short *)tmp_pos, &spk_attr);
576576
buf[cnt++] = attr_ch;
577-
while (tmpx < vc->vc_cols - 1 && cnt < sizeof(buf) - 1) {
577+
while (tmpx < vc->vc_cols - 1 && cnt < ARRAY_SIZE(buf) - 1) {
578578
tmp_pos += 2;
579579
tmpx++;
580580
ch = get_char(vc, (u_short *)tmp_pos, &temp);

0 commit comments

Comments
 (0)