Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3d2409d4 authored by Andy Shevchenko's avatar Andy Shevchenko Committed by Greg Kroah-Hartman
Browse files

staging: speakup: fix a bug when translate octal numbers



There are actually overflow bug and typo. And bug was never happened due to the
typo.

Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: default avatarSamuel Thibault <samuel.thibault@ens-lyon.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent de68600e
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -344,9 +344,9 @@ char *spk_xlate(char *s)
			p1++;
			p1++;
		} else if (*p1 >= '0' && *p1 <= '7') {
		} else if (*p1 >= '0' && *p1 <= '7') {
			num = (*p1++)&7;
			num = (*p1++)&7;
			while (num < 256 && *p1 >= '0' && *p1 <= '7') {
			while (num < 32 && *p1 >= '0' && *p1 <= '7') {
				num <<= 3;
				num <<= 3;
				num = (*p1++)&7;
				num += (*p1++)&7;
			}
			}
			*p++ = num;
			*p++ = num;
		} else if (*p1 == 'x' &&
		} else if (*p1 == 'x' &&