From fcf8145fee8b4952d5d6c88d2b50402d4a81d775 Mon Sep 17 00:00:00 2001 From: Miika Pekkarinen Date: Sun, 25 Feb 2007 19:01:32 +0000 Subject: [PATCH] Fixed database export crashing with long tags. And failing without DB loaded to RAM due to the recently added new tags in DB, thus reaching the fd limit. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12481 a1c6a512-1295-4272-9138-f99709370657 --- apps/tagcache.c | 4 ++-- firmware/include/file.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/tagcache.c b/apps/tagcache.c index 43b4ad6e3b..0204771ffa 100644 --- a/apps/tagcache.c +++ b/apps/tagcache.c @@ -2641,11 +2641,11 @@ bool tagcache_modify_numeric_entry(struct tagcache_search *tcs, static bool write_tag(int fd, const char *tagstr, const char *datastr) { - char buf[256]; + char buf[512]; int i; snprintf(buf, sizeof buf, "%s=\"", tagstr); - for (i = strlen(buf); i < (long)sizeof(buf)-2; i++) + for (i = strlen(buf); i < (long)sizeof(buf)-3; i++) { if (*datastr == '\0') break; diff --git a/firmware/include/file.h b/firmware/include/file.h index 7b4b99aa79..989f50a283 100644 --- a/firmware/include/file.h +++ b/firmware/include/file.h @@ -25,7 +25,7 @@ #undef MAX_PATH /* this avoids problems when building simulator */ #define MAX_PATH 260 -#define MAX_OPEN_FILES 8 +#define MAX_OPEN_FILES 11 #ifndef SEEK_SET #define SEEK_SET 0