aboutsummaryrefslogtreecommitdiffstats
path: root/src/directory_save.h
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-11-01 15:37:16 +0100
committerMax Kellermann <max@duempel.org>2009-11-01 15:37:16 +0100
commit9bcfd3a47da540abeb2da06471cf2fa11c14db49 (patch)
tree37cfca02bd797fe16329717d036c05dee07a147a /src/directory_save.h
parent451f932d80f5b695adb59e293391d17c9b996fb8 (diff)
downloadmpd-9bcfd3a47da540abeb2da06471cf2fa11c14db49.tar.gz
mpd-9bcfd3a47da540abeb2da06471cf2fa11c14db49.tar.xz
mpd-9bcfd3a47da540abeb2da06471cf2fa11c14db49.zip
text_file: allocate line buffers dynamically
Use a single GString buffer object in all functions loading the database. Enlarge it automatically for long lines. This eliminates the maximum line length for tag values. There is still an upper limit of 512 kB to prevent denial of service, but that's reasonable I guess.
Diffstat (limited to 'src/directory_save.h')
-rw-r--r--src/directory_save.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/directory_save.h b/src/directory_save.h
index 28ec094ad..d9daa3fed 100644
--- a/src/directory_save.h
+++ b/src/directory_save.h
@@ -31,6 +31,7 @@ int
directory_save(FILE *fp, struct directory *directory);
bool
-directory_load(FILE *fp, struct directory *directory, GError **error);
+directory_load(FILE *fp, struct directory *directory,
+ GString *buffer, GError **error);
#endif