forked from len0rd/rockbox
Fix strcpy from a user-supplied string to fixed size string.
Author: Marcin Bukat Flyspray: FS#11151 git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25389 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
d8a053351e
commit
ef41ad91db
1 changed files with 2 additions and 1 deletions
|
|
@ -333,7 +333,8 @@ int main (int argc, char** argv)
|
|||
return 2;
|
||||
}
|
||||
/* we store a 4-letter model name too, for humans */
|
||||
strcpy(modelname, &argv[1][5]);
|
||||
strncpy(modelname, &argv[1][5],4);
|
||||
modelname[4] = '\0'; /* to be sure we are null terminated */
|
||||
chksum = modelnum; /* start checksum calcs with this */
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue