summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorTeruaki Kawashima <teru@rockbox.org>2010-11-15 12:33:47 +0000
committerTeruaki Kawashima <teru@rockbox.org>2010-11-15 12:33:47 +0000
commit2142628a2dba84c5dd79cc54b48ab1ee5f8b70f8 (patch)
treec60fd5f4dc8245d889142cba1b775dca9552e1ab /apps
parent7ee3b110221b31acaac4d5d24cf36089c341bcaa (diff)
downloadrockbox-2142628a2dba84c5dd79cc54b48ab1ee5f8b70f8.tar.gz
rockbox-2142628a2dba84c5dd79cc54b48ab1ee5f8b70f8.tar.bz2
rockbox-2142628a2dba84c5dd79cc54b48ab1ee5f8b70f8.zip
FS#11751: increase buffer size of settings to store path.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28603 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-rw-r--r--apps/onplay.c3
-rw-r--r--apps/plugin.h4
-rw-r--r--apps/settings.h7
3 files changed, 8 insertions, 6 deletions
diff --git a/apps/onplay.c b/apps/onplay.c
index 1d59b34aa4..eb0c168f0a 100644
--- a/apps/onplay.c
+++ b/apps/onplay.c
@@ -1038,7 +1038,8 @@ MENUITEM_FUNCTION(set_backdrop_item, 0, ID2P(LANG_SET_AS_BACKDROP),
#ifdef HAVE_RECORDING
static bool set_recdir(void)
{
- strlcpy(global_settings.rec_directory, selected_file, MAX_FILENAME+1);
+ strlcpy(global_settings.rec_directory, selected_file,
+ sizeof(global_settings.rec_directory));
settings_save();
return false;
}
diff --git a/apps/plugin.h b/apps/plugin.h
index 0503980c1e..3f80096ec7 100644
--- a/apps/plugin.h
+++ b/apps/plugin.h
@@ -147,12 +147,12 @@ void* plugin_get_buffer(size_t *buffer_size);
#define PLUGIN_MAGIC 0x526F634B /* RocK */
/* increase this every time the api struct changes */
-#define PLUGIN_API_VERSION 194
+#define PLUGIN_API_VERSION 195
/* update this to latest version if a change to the api struct breaks
backwards compatibility (and please take the opportunity to sort in any
new function which are "waiting" at the end of the function table) */
-#define PLUGIN_MIN_API_VERSION 194
+#define PLUGIN_MIN_API_VERSION 195
/* plugin return codes */
/* internal returns start at 0x100 to make exit(1..255) work */
diff --git a/apps/settings.h b/apps/settings.h
index 20aee18885..cd06dae70b 100644
--- a/apps/settings.h
+++ b/apps/settings.h
@@ -42,6 +42,7 @@ struct opt_items {
/** Setting values defines **/
#define MAX_FILENAME 32
+#define MAX_PATHNAME 80
enum {
@@ -417,7 +418,7 @@ struct user_settings
int rec_split_method; /* time/filesize */
int rec_prerecord_time; /* In seconds, 0-30, 0 means OFF */
- char rec_directory[MAX_FILENAME+1];
+ char rec_directory[MAX_PATHNAME+1];
int cliplight; /* 0 = off
1 = main lcd
2 = main and remote lcd
@@ -531,7 +532,7 @@ struct user_settings
unsigned char rsbs_file[MAX_FILENAME+1]; /* last remote statusbar skin */
#endif
unsigned char lang_file[MAX_FILENAME+1]; /* last language */
- unsigned char playlist_catalog_dir[MAX_FILENAME+1];
+ unsigned char playlist_catalog_dir[MAX_PATHNAME+1];
int skip_length; /* skip length */
int max_files_in_dir; /* Max entries in directory (file browser) */
int max_files_in_playlist; /* Max entries in playlist */
@@ -810,7 +811,7 @@ struct user_settings
#endif
} hw_eq_bands[AUDIOHW_EQ_BAND_NUM];
#endif /* AUDIOHW_HAVE_EQ */
- char start_directory[2*MAX_FILENAME+1];
+ char start_directory[MAX_PATHNAME+1];
};
/** global variables **/