24 lines
926 B
Plaintext
24 lines
926 B
Plaintext
$OpenBSD: patch-gpasm_gpasm_c,v 1.2 2004/01/30 01:01:11 naddy Exp $
|
|
--- gpasm/gpasm.c.orig 2004-01-09 19:10:36.000000000 +1100
|
|
+++ gpasm/gpasm.c 2004-01-25 20:36:30.000000000 +1100
|
|
@@ -266,8 +266,8 @@ process_args( int argc, char *argv[])
|
|
#endif
|
|
break;
|
|
case 'o':
|
|
- strcpy(state.hexfilename, optarg);
|
|
- strcpy(state.basefilename, optarg);
|
|
+ strlcpy(state.hexfilename, optarg, sizeof(state.hexfilename));
|
|
+ strlcpy(state.basefilename, optarg, sizeof(state.basefilename));
|
|
pc = strrchr(state.basefilename, '.');
|
|
if (pc)
|
|
*pc = 0;
|
|
@@ -324,7 +324,7 @@ assemble(void)
|
|
state.c_memory = state.i_memory = i_memory_create();
|
|
|
|
if(state.basefilename[0] == '\0') {
|
|
- strcpy(state.basefilename, state.srcfilename);
|
|
+ strlcpy(state.basefilename, state.srcfilename, sizeof(state.basefilename));
|
|
pc = strrchr(state.basefilename, '.');
|
|
if (pc)
|
|
*pc = 0;
|