summaryrefslogtreecommitdiff
path: root/games/lbreakout2/files/patch-src_editor.c
diff options
context:
space:
mode:
Diffstat (limited to 'games/lbreakout2/files/patch-src_editor.c')
-rw-r--r--games/lbreakout2/files/patch-src_editor.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/games/lbreakout2/files/patch-src_editor.c b/games/lbreakout2/files/patch-src_editor.c
new file mode 100644
index 000000000000..126c0d7e8bfa
--- /dev/null
+++ b/games/lbreakout2/files/patch-src_editor.c
@@ -0,0 +1,14 @@
+
+$FreeBSD$
+
+--- src/editor.c.orig Tue Mar 2 21:26:03 2004
++++ src/editor.c Tue Mar 2 21:27:00 2004
+@@ -725,7 +725,7 @@
+ {
+ FILE *file = 0;
+ /* set full file name */
+- sprintf( edit_file_name, "%s/%s/lbreakout2-levels/%s", (getenv( "HOME" )?getenv( "HOME" ):"."), CONFIG_DIR_NAME, file_name );
++ snprintf( edit_file_name, sizeof(edit_file_name), "%s/%s/lbreakout2-levels/%s", (getenv( "HOME" )?getenv( "HOME" ):"."), CONFIG_DIR_NAME, file_name );
+ /* test this file for write access. use append to keep contents */
+ if ( ( file = fopen( edit_file_name, "a" ) ) == 0 ) {
+ fprintf( stderr, "Permission to write to file '%s' denied.\n", edit_file_name );