1
0
Fork 0
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:
Frank Gevaerts 2010-03-29 21:06:36 +00:00
parent d8a053351e
commit ef41ad91db

View file

@ -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 */
}