Commit f417f5e4 authored by Dan Carpenter's avatar Dan Carpenter Committed by David S. Miller

isdn: cleanup: make buffer smaller

This showed up in my audit because we use strcpy() to copy "ds" into a
32 character buffer inside the isdn_tty_dial() function.  But it turns
out that we only ever use the first 32 characters so it's OK.  I have
changed the declaration to make the static checkers happy.
Signed-off-by: default avatarDan Carpenter <error27@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 017d79ef
...@@ -3515,7 +3515,7 @@ isdn_tty_parse_at(modem_info * info) ...@@ -3515,7 +3515,7 @@ isdn_tty_parse_at(modem_info * info)
{ {
atemu *m = &info->emu; atemu *m = &info->emu;
char *p; char *p;
char ds[40]; char ds[ISDN_MSNLEN];
#ifdef ISDN_DEBUG_AT #ifdef ISDN_DEBUG_AT
printk(KERN_DEBUG "AT: '%s'\n", m->mdmcmd); printk(KERN_DEBUG "AT: '%s'\n", m->mdmcmd);
...@@ -3594,7 +3594,7 @@ isdn_tty_parse_at(modem_info * info) ...@@ -3594,7 +3594,7 @@ isdn_tty_parse_at(modem_info * info)
break; break;
case '3': case '3':
p++; p++;
sprintf(ds, "\r\n%d", info->emu.charge); snprintf(ds, sizeof(ds), "\r\n%d", info->emu.charge);
isdn_tty_at_cout(ds, info); isdn_tty_at_cout(ds, info);
break; break;
default:; default:;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment