Skip to content

Commit

Permalink
isdn: cleanup: make buffer smaller
Browse files Browse the repository at this point in the history
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: Dan Carpenter <error27@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Dan Carpenter authored and David S. Miller committed Sep 7, 2010
1 parent 017d79e commit f417f5e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/isdn/i4l/isdn_tty.c
Original file line number Diff line number Diff line change
Expand Up @@ -3515,7 +3515,7 @@ isdn_tty_parse_at(modem_info * info)
{
atemu *m = &info->emu;
char *p;
char ds[40];
char ds[ISDN_MSNLEN];

#ifdef ISDN_DEBUG_AT
printk(KERN_DEBUG "AT: '%s'\n", m->mdmcmd);
Expand Down Expand Up @@ -3594,7 +3594,7 @@ isdn_tty_parse_at(modem_info * info)
break;
case '3':
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);
break;
default:;
Expand Down

0 comments on commit f417f5e

Please sign in to comment.