make sure we don't choke on overly long lines in .desktop files
authorLennart Poettering <lennart@poettering.net>
Sat, 21 Feb 2009 22:47:08 +0000 (23:47 +0100)
committerLennart Poettering <lennart@poettering.net>
Sat, 21 Feb 2009 22:47:08 +0000 (23:47 +0100)
src/modules/module-augment-properties.c
src/pulsecore/conf-parser.c

index 90bfbe7..9911186 100644 (file)
@@ -195,6 +195,8 @@ static pa_hook_result_t process(struct userdata *u, pa_proplist *p) {
 
     time(&now);
 
+    pa_log_debug("Looking for .desktop file for %s", pn);
+
     if ((r = pa_hashmap_get(u->cache, pn))) {
         if (now-r->timestamp > STAT_INTERVAL) {
             r->timestamp = now;
index b7ec2b3..1d98f36 100644 (file)
@@ -127,7 +127,7 @@ static int parse_line(const char *filename, unsigned line, char **section, const
 int pa_config_parse(const char *filename, FILE *f, const pa_config_item *t, void *userdata) {
     int r = -1;
     unsigned line = 0;
-    int do_close = !f;
+    pa_bool_t do_close = !f;
     char *section = NULL;
 
     pa_assert(filename);
@@ -144,7 +144,7 @@ int pa_config_parse(const char *filename, FILE *f, const pa_config_item *t, void
     }
 
     while (!feof(f)) {
-        char l[256];
+        char l[4096];
 
         if (!fgets(l, sizeof(l), f)) {
             if (feof(f))