Staging: speakup: fix an improperly-declared variable.
authorChristopher Brannon <chris@the-brannons.com>
Sat, 16 Jun 2012 21:55:20 +0000 (16:55 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 2 Oct 2012 16:47:24 +0000 (09:47 -0700)
commit 4ea418b8b2fa8a70d0fcc8231b65e67b3a72984b upstream.

A local static variable was declared as a pointer to a string
constant.  We're assigning to the underlying memory, so it
needs to be an array instead.

Signed-off-by: Christopher Brannon <chris@the-brannons.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/speakup/main.c

index 42fcf7e9cb6424c6e2d12f6f3c02505110279138..59a6d4da873be775ad746c65b2c56906e0dd7b6c 100644 (file)
@@ -1855,7 +1855,7 @@ static void speakup_bits(struct vc_data *vc)
 
 static int handle_goto(struct vc_data *vc, u_char type, u_char ch, u_short key)
 {
-       static u_char *goto_buf = "\0\0\0\0\0\0";
+       static u_char goto_buf[8];
        static int num;
        int maxlen, go_pos;
        char *cp;